@@ -139,6 +139,9 @@ |
||
| 139 | 139 | return $this->getTextMessage( $key, $arguments ); |
| 140 | 140 | } |
| 141 | 141 | |
| 142 | + /** |
|
| 143 | + * @param string $key |
|
| 144 | + */ |
|
| 142 | 145 | protected function getTextMessage( $key, $arguments ) { |
| 143 | 146 | |
| 144 | 147 | $this->messages[ $key ] = wfMessage( $arguments )->inLanguage( $this->language )->text(); |
@@ -167,10 +167,16 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | + /** |
|
| 171 | + * @return boolean |
|
| 172 | + */ |
|
| 170 | 173 | protected function getPropertyLabel( $id ) { |
| 171 | 174 | return $this->lookupWithIndexForId( 'label', $id ); |
| 172 | 175 | } |
| 173 | 176 | |
| 177 | + /** |
|
| 178 | + * @return boolean |
|
| 179 | + */ |
|
| 174 | 180 | protected function getPropertyVisibility( $id ) { |
| 175 | 181 | |
| 176 | 182 | $show = $this->lookupWithIndexForId( 'show', $id ); |
@@ -204,6 +210,11 @@ discard block |
||
| 204 | 210 | return null; |
| 205 | 211 | } |
| 206 | 212 | |
| 213 | + /** |
|
| 214 | + * @param string $index |
|
| 215 | + * |
|
| 216 | + * @return string |
|
| 217 | + */ |
|
| 207 | 218 | protected function lookupWithIndexForId( $index, $id ) { |
| 208 | 219 | |
| 209 | 220 | $id = strtoupper( $id ); |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * @since 1.0 |
| 51 | 51 | * |
| 52 | 52 | * @param SemanticData $semanticData |
| 53 | - * @param Factory $factory |
|
| 53 | + * @param Factory $appFactory |
|
| 54 | 54 | * @param array $configuration |
| 55 | 55 | */ |
| 56 | 56 | public function __construct( SemanticData $semanticData, AppFactory $appFactory, array $configuration ) { |
@@ -137,11 +137,19 @@ discard block |
||
| 137 | 137 | return true; |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | + /** |
|
| 141 | + * @param string|null $propertyId |
|
| 142 | + */ |
|
| 140 | 143 | protected function hasRegisteredPropertyId( $propertyId, $cachedProperties ) { |
| 141 | 144 | return ( DIProperty::getPredefinedPropertyTypeId( $propertyId ) === '' ) || |
| 142 | 145 | array_key_exists( $propertyId, $cachedProperties ); |
| 143 | 146 | } |
| 144 | 147 | |
| 148 | + /** |
|
| 149 | + * @param DIProperty $property |
|
| 150 | + * |
|
| 151 | + * @return DataItem |
|
| 152 | + */ |
|
| 145 | 153 | protected function createDataItemById( $externalId, $property ) { |
| 146 | 154 | |
| 147 | 155 | $dataItem = null; |