Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiEditors.php |
— | — | @@ -21,10 +21,10 @@ |
22 | 22 | $translatedTextValueObjectAttributesEditor = new RecordUnorderedListEditor($objectAttributesAttribute, 5); |
23 | 23 | $optionValueObjectAttributesEditor = new RecordUnorderedListEditor($objectAttributesAttribute, 5); |
24 | 24 | |
25 | | - setObjectAttributesEditor($textValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $textAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute)); |
26 | | - setObjectAttributesEditor($linkValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $linkAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute)); |
27 | | - setObjectAttributesEditor($translatedTextValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $translatedTextAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute)); |
28 | | - setObjectAttributesEditor($optionValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $optionAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute)); |
| 25 | + addObjectAttributesEditors($textValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $textAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute)); |
| 26 | + addObjectAttributesEditors($linkValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $linkAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute)); |
| 27 | + addObjectAttributesEditors($translatedTextValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $translatedTextAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute)); |
| 28 | + addObjectAttributesEditors($optionValueObjectAttributesEditor, $viewInformation, new ObjectIdFetcher(0, $optionAttributeIdAttribute), $annotationMeaningName, new ObjectIdFetcher(1, $definedMeaningIdAttribute)); |
29 | 29 | } |
30 | 30 | |
31 | 31 | function getTransactionEditor(Attribute $attribute) { |
— | — | @@ -122,7 +122,7 @@ |
123 | 123 | return $editor; |
124 | 124 | } |
125 | 125 | |
126 | | -function setObjectAttributesEditor(Editor $objectAttributesEditor, ViewInformation $viewInformation, Fetcher $objectIdFetcher, $levelDefinedMeaningName, Fetcher $dmObjectIdFetcher) { |
| 126 | +function addObjectAttributesEditors(Editor $objectAttributesEditor, ViewInformation $viewInformation, Fetcher $objectIdFetcher, $levelDefinedMeaningName, Fetcher $dmObjectIdFetcher) { |
127 | 127 | $objectAttributesEditor->addEditor(getTextAttributeValuesEditor($viewInformation, new TextAttributeValuesController($objectIdFetcher), $levelDefinedMeaningName, $dmObjectIdFetcher)); |
128 | 128 | $objectAttributesEditor->addEditor(getTranslatedTextAttributeValuesEditor($viewInformation, new TranslatedTextAttributeValuesController($objectIdFetcher, $viewInformation->filterLanguageId), $levelDefinedMeaningName, $dmObjectIdFetcher)); |
129 | 129 | $objectAttributesEditor->addEditor(getLinkAttributeValuesEditor($viewInformation, new LinkAttributeValuesController($objectIdFetcher), $levelDefinedMeaningName, $dmObjectIdFetcher)); |
— | — | @@ -135,7 +135,7 @@ |
136 | 136 | |
137 | 137 | $result = new RecordUnorderedListEditor($attribute, 5); |
138 | 138 | |
139 | | - setObjectAttributesEditor( |
| 139 | + addObjectAttributesEditors( |
140 | 140 | $result, |
141 | 141 | $viewInformation, |
142 | 142 | new ObjectIdFetcher(0, $idAttribute), |
— | — | @@ -152,7 +152,7 @@ |
153 | 153 | |
154 | 154 | $result = new RecordUnorderedListEditor($attribute, 5); |
155 | 155 | |
156 | | - setObjectAttributesEditor( |
| 156 | + addObjectAttributesEditors( |
157 | 157 | $result, |
158 | 158 | $viewInformation, |
159 | 159 | new DefinitionObjectIdFetcher(0, $idAttribute), |