1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace SMW\MediaWiki\Specials\Browse; |
4
|
|
|
|
5
|
|
|
use SMW\SemanticData; |
6
|
|
|
use SMW\ApplicationFactory; |
7
|
|
|
use SMW\DataValueFactory; |
8
|
|
|
use SMW\Localizer; |
9
|
|
|
use SMW\DIProperty; |
10
|
|
|
use SMW\DIWikiPage; |
11
|
|
|
use SMW\Store; |
12
|
|
|
use Html; |
13
|
|
|
use SMW\Message; |
14
|
|
|
use SMWDataValue as DataValue; |
15
|
|
|
use SMW\DataValues\ValueFormatters\DataValueFormatter; |
16
|
|
|
use SMW\RequestOptions; |
17
|
|
|
|
18
|
|
|
/** |
19
|
|
|
* @license GNU GPL v2+ |
20
|
|
|
* @since 2.5 |
21
|
|
|
* |
22
|
|
|
* @author Denny Vrandecic |
23
|
|
|
* @author mwjames |
24
|
|
|
*/ |
25
|
|
|
class ContentsBuilder { |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @var Store |
29
|
|
|
*/ |
30
|
|
|
private $store; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* @var DIWikiPage |
34
|
|
|
*/ |
35
|
|
|
private $subject; |
36
|
|
|
|
37
|
|
|
/** |
38
|
|
|
* @var boolean |
39
|
|
|
*/ |
40
|
|
|
private $showoutgoing = true; |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* To display incoming values? |
44
|
|
|
* |
45
|
|
|
* @var boolean |
46
|
|
|
*/ |
47
|
|
|
private $showincoming = false; |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* At which incoming property are we currently? |
51
|
|
|
* @var integer |
52
|
|
|
*/ |
53
|
|
|
private $offset = 0; |
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* How many incoming values should be asked for |
57
|
|
|
* @var integer |
58
|
|
|
*/ |
59
|
|
|
private $incomingValuesCount = 8; |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* How many incoming properties should be asked for |
63
|
|
|
* @var integer |
64
|
|
|
*/ |
65
|
|
|
private $incomingPropertiesCount = 21; |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* @var array |
69
|
|
|
*/ |
70
|
|
|
private $extraModules = array(); |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* @var array |
74
|
|
|
*/ |
75
|
|
|
private $options = array(); |
76
|
|
|
|
77
|
|
|
/** |
78
|
|
|
* @since 2.5 |
79
|
|
|
* |
80
|
|
|
* @param Store $store |
81
|
|
|
* @param DIWikiPage $subject |
82
|
|
|
*/ |
83
|
|
|
public function __construct( Store $store, DIWikiPage $subject ) { |
84
|
|
|
$this->store = $store; |
85
|
|
|
$this->subject = DataValueFactory::getInstance()->newDataValueByItem( $subject ); |
|
|
|
|
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @since 2.5 |
90
|
|
|
* |
91
|
|
|
* @param string $key |
92
|
|
|
* @param mixed $value |
93
|
|
|
*/ |
94
|
|
|
public function setOption( $key, $value ) { |
95
|
|
|
$this->options[$key] = $value; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @since 2.5 |
100
|
|
|
* |
101
|
|
|
* @param string $key |
102
|
|
|
* |
103
|
|
|
* @return mixed |
104
|
|
|
*/ |
105
|
|
|
public function getOption( $key ) { |
106
|
|
|
|
107
|
|
|
if ( isset( $this->options[$key] ) ) { |
108
|
|
|
return $this->options[$key]; |
109
|
|
|
} |
110
|
|
|
|
111
|
|
|
return null; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @since 2.5 |
116
|
|
|
* |
117
|
|
|
* @param string $json |
118
|
|
|
*/ |
119
|
|
|
public function importOptionsFromJson( $json ) { |
120
|
|
|
$this->options = json_decode( $json, true ); |
|
|
|
|
121
|
|
|
} |
122
|
|
|
|
123
|
|
|
/** |
124
|
|
|
* @since 2.5 |
125
|
|
|
* |
126
|
|
|
* @return string |
127
|
|
|
*/ |
128
|
|
|
public function getHtml() { |
129
|
|
|
|
130
|
|
|
if ( ( $offset = $this->getOption( 'offset' ) ) ) { |
131
|
|
|
$this->offset = $offset; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
if ( $this->getOption( 'showAll' ) ) { |
135
|
|
|
$this->incomingValuesCount = 21; |
136
|
|
|
$this->incomingPropertiesCount = - 1; |
137
|
|
|
$this->showoutgoing = true; |
138
|
|
|
$this->showincoming = true; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
if ( $this->getOption( 'dir' ) === 'both' || $this->getOption( 'dir' ) === 'in' ) { |
142
|
|
|
$this->showincoming = true; |
143
|
|
|
} |
144
|
|
|
|
145
|
|
|
if ( $this->getOption( 'dir' ) === 'in' ) { |
146
|
|
|
$this->showoutgoing = false; |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
if ( $this->getOption( 'dir' ) === 'out' ) { |
150
|
|
|
$this->showincoming = false; |
151
|
|
|
} |
152
|
|
|
|
153
|
|
|
return $this->doGenerateHtml(); |
154
|
|
|
} |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* @since 2.5 |
158
|
|
|
* |
159
|
|
|
* @return string |
160
|
|
|
*/ |
161
|
|
|
public function getEmptyHtml() { |
162
|
|
|
global $wgContLang; |
|
|
|
|
163
|
|
|
|
164
|
|
|
$leftside = !( $wgContLang->isRTL() ); |
165
|
|
|
$html = ''; |
166
|
|
|
$form = ''; |
167
|
|
|
|
168
|
|
|
$semanticData = new SemanticData( $this->subject->getDataItem() ); |
|
|
|
|
169
|
|
|
$this->articletext = $this->subject->getWikiValue(); |
|
|
|
|
170
|
|
|
|
171
|
|
|
$html .= $this->displayHead(); |
172
|
|
|
$html .= $this->displayData( $semanticData, $leftside, false, true ); |
173
|
|
|
$html .= $this->displayBottom( false ); |
174
|
|
|
|
175
|
|
|
if ( $this->getOption( 'printable' ) !== 'yes' && !$this->getOption( 'including' ) ) { |
176
|
|
|
$form = FormHelper::getQueryForm( $this->articletext ); |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
return Html::rawElement( |
180
|
|
|
'div', |
181
|
|
|
array( |
182
|
|
|
'class' => 'smwb-content' |
183
|
|
|
), $html |
184
|
|
|
) . $form; |
185
|
|
|
} |
186
|
|
|
|
187
|
|
|
/** |
188
|
|
|
* Create and output HTML including the complete factbox, based on the extracted |
189
|
|
|
* parameters in the execute comment. |
190
|
|
|
* |
191
|
|
|
* @return string A HTML string with the factbox |
192
|
|
|
*/ |
193
|
|
|
private function doGenerateHtml() { |
194
|
|
|
global $wgContLang; |
|
|
|
|
195
|
|
|
$html = "<div class=\"smwb-datasheet\">"; |
196
|
|
|
$leftside = !( $wgContLang->isRTL() ); // For right to left languages, all is mirrored |
197
|
|
|
$modules = array(); |
|
|
|
|
198
|
|
|
|
199
|
|
|
if ( !$this->subject->isValid() ) { |
|
|
|
|
200
|
|
|
return $html; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
$semanticData = new SemanticData( $this->subject->getDataItem() ); |
|
|
|
|
204
|
|
|
$html .= $this->displayHead(); |
205
|
|
|
|
206
|
|
|
if ( $this->showoutgoing ) { |
207
|
|
|
$semanticData = $this->store->getSemanticData( $this->subject->getDataItem() ); |
|
|
|
|
208
|
|
|
$html .= $this->displayData( $semanticData, $leftside ); |
209
|
|
|
$html .= $this->displayCenter( $this->subject->getLongWikiText() ); |
|
|
|
|
210
|
|
|
} |
211
|
|
|
|
212
|
|
|
if ( $this->showincoming ) { |
213
|
|
|
list( $indata, $more ) = $this->getInData(); |
214
|
|
|
|
215
|
|
|
if ( !$this->getOption( 'showInverse' ) ) { |
216
|
|
|
$leftside = !$leftside; |
217
|
|
|
} |
218
|
|
|
|
219
|
|
|
$html .= $this->displayData( $indata, $leftside, true ); |
220
|
|
|
$html .= $this->displayBottom( $more ); |
221
|
|
|
} |
222
|
|
|
|
223
|
|
|
$this->articletext = $this->subject->getWikiValue(); |
|
|
|
|
224
|
|
|
$html .= "</div>"; |
225
|
|
|
|
226
|
|
|
\Hooks::run( 'SMW::Browse::AfterDataLookupComplete', array( $this->store, $semanticData, &$html, &$this->extraModules ) ); |
227
|
|
|
|
228
|
|
|
if ( $this->getOption( 'printable' ) !== 'yes' && !$this->getOption( 'including' ) ) { |
229
|
|
|
$html .= FormHelper::getQueryForm( $this->articletext ) ; |
230
|
|
|
} |
231
|
|
|
|
232
|
|
|
$html .= Html::element( |
233
|
|
|
'div', |
234
|
|
|
array( |
235
|
|
|
'class' => 'smwb-modules', |
236
|
|
|
'data-modules' => json_encode( $this->extraModules ) |
237
|
|
|
) |
238
|
|
|
); |
239
|
|
|
|
240
|
|
|
return $html; |
241
|
|
|
} |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* Creates the HTML table displaying the data of one subject. |
245
|
|
|
* |
246
|
|
|
* @param[in] $data SMWSemanticData The data to be displayed |
247
|
|
|
* @param[in] $left bool Should properties be displayed on the left side? |
248
|
|
|
* @param[in] $incoming bool Is this an incoming? Or an outgoing? |
249
|
|
|
* |
250
|
|
|
* @return string A string containing the HTML with the factbox |
251
|
|
|
*/ |
252
|
|
|
private function displayData( SemanticData $data, $left = true, $incoming = false, $isLoading = false ) { |
253
|
|
|
// Some of the CSS classes are different for the left or the right side. |
254
|
|
|
// In this case, there is an "i" after the "smwb-". This is set here. |
255
|
|
|
$ccsPrefix = $left ? 'smwb-' : 'smwb-i'; |
256
|
|
|
|
257
|
|
|
$html = "<div class=\"smw-table {$ccsPrefix}factbox smwb-bottom\">"; |
258
|
|
|
$noresult = true; |
259
|
|
|
|
260
|
|
|
$contextPage = $data->getSubject(); |
261
|
|
|
$diProperties = $data->getProperties(); |
262
|
|
|
$showInverse = $this->getOption( 'showInverse' ); |
263
|
|
|
|
264
|
|
|
foreach ( $diProperties as $key => $diProperty ) { |
265
|
|
|
|
266
|
|
|
$dvProperty = DataValueFactory::getInstance()->newDataValueByItem( |
267
|
|
|
$diProperty, |
268
|
|
|
null |
269
|
|
|
); |
270
|
|
|
|
271
|
|
|
$dvProperty->setContextPage( |
272
|
|
|
$contextPage |
|
|
|
|
273
|
|
|
); |
274
|
|
|
|
275
|
|
|
$propertyLabel = ValueFormatter::getPropertyLabel( |
276
|
|
|
$dvProperty, |
|
|
|
|
277
|
|
|
$incoming, |
278
|
|
|
$showInverse |
279
|
|
|
); |
280
|
|
|
|
281
|
|
|
if ( $propertyLabel === null ) { |
282
|
|
|
continue; |
283
|
|
|
} |
284
|
|
|
|
285
|
|
|
$head = "<div class=\"smw-table-cell smwb-cell smwb-prophead\">" . $propertyLabel . "</div>\n"; |
286
|
|
|
$body = "<div class=\"smw-table-cell smwb-cell smwb-propval\">\n"; |
287
|
|
|
|
288
|
|
|
$values = $data->getPropertyValues( $diProperty ); |
289
|
|
|
|
290
|
|
|
if ( $incoming && ( count( $values ) >= $this->incomingValuesCount ) ) { |
291
|
|
|
$moreIncoming = true; |
292
|
|
|
array_pop( $values ); |
293
|
|
|
} else { |
294
|
|
|
$moreIncoming = false; |
295
|
|
|
} |
296
|
|
|
|
297
|
|
|
$first = true; |
298
|
|
|
foreach ( $values as /* SMWDataItem */ $di ) { |
299
|
|
|
if ( $first ) { |
300
|
|
|
$first = false; |
301
|
|
|
} else { |
302
|
|
|
$body .= ', '; |
303
|
|
|
} |
304
|
|
|
|
305
|
|
|
if ( $incoming ) { |
306
|
|
|
$dv = DataValueFactory::getInstance()->newDataValueByItem( $di, null ); |
307
|
|
|
} else { |
308
|
|
|
$dv = DataValueFactory::getInstance()->newDataValueByItem( $di, $diProperty ); |
309
|
|
|
} |
310
|
|
|
|
311
|
|
|
$body .= "<span class=\"{$ccsPrefix}value\">" . |
312
|
|
|
$this->displayValue( $dvProperty, $dv, $incoming ) . "</span>\n"; |
|
|
|
|
313
|
|
|
} |
314
|
|
|
|
315
|
|
|
// Added in 2.3 |
316
|
|
|
// link to the remaining incoming pages |
317
|
|
|
if ( $moreIncoming && \Hooks::run( 'SMW::Browse::BeforeIncomingPropertyValuesFurtherLinkCreate', array( $diProperty, $this->subject->getDataItem(), &$body ) ) ) { |
|
|
|
|
318
|
|
|
$body .= \Html::element( |
319
|
|
|
'a', |
320
|
|
|
array( |
321
|
|
|
'href' => \SpecialPage::getSafeTitleFor( 'SearchByProperty' )->getLocalURL( array( |
322
|
|
|
'property' => $dvProperty->getWikiValue(), |
323
|
|
|
'value' => $this->subject->getWikiValue() |
|
|
|
|
324
|
|
|
) ) |
325
|
|
|
), |
326
|
|
|
wfMessage( 'smw_browse_more' )->text() |
327
|
|
|
); |
328
|
|
|
|
329
|
|
|
} |
330
|
|
|
|
331
|
|
|
$body .= "</div>\n"; |
332
|
|
|
|
333
|
|
|
// display row |
334
|
|
|
$html .= "<div class=\"smw-table-row {$ccsPrefix}propvalue\">\n" . |
335
|
|
|
( $left ? ( $head . $body ):( $body . $head ) ) . "</div>\n"; |
336
|
|
|
$noresult = false; |
337
|
|
|
} // end foreach properties |
338
|
|
|
|
339
|
|
|
if ( $noresult ) { |
340
|
|
|
$noMsgKey = $incoming ? 'smw_browse_no_incoming':'smw_browse_no_outgoing'; |
341
|
|
|
$rColumn = "<div class=\"smw-table-cell smwb-cell smwb-prophead\"></div>"; |
342
|
|
|
$lColumn = "<div class=\"smw-table-cell smwb-cell smwb-propval\">" . wfMessage( $isLoading ? 'smw-browse-from-backend' : $noMsgKey )->escaped() . "</div>"; |
343
|
|
|
$html .= "<div class=\"smw-table-row {$ccsPrefix}propvalue\">" . ( $left ? ( $rColumn . $lColumn ):( $lColumn . $rColumn ) ) . "</div>"; |
344
|
|
|
} |
345
|
|
|
|
346
|
|
|
$html .= "</div>\n"; |
347
|
|
|
|
348
|
|
|
return $html; |
349
|
|
|
} |
350
|
|
|
|
351
|
|
|
/** |
352
|
|
|
* Displays a value, including all relevant links (browse and search by property) |
353
|
|
|
* |
354
|
|
|
* @param[in] $property SMWPropertyValue The property this value is linked to the subject with |
355
|
|
|
* @param[in] $value DataValue The actual value |
356
|
|
|
* @param[in] $incoming bool If this is an incoming or outgoing link |
357
|
|
|
* |
358
|
|
|
* @return string HTML with the link to the article, browse, and search pages |
359
|
|
|
*/ |
360
|
|
|
private function displayValue( \SMWPropertyValue $property, DataValue $dataValue, $incoming ) { |
361
|
|
|
|
362
|
|
|
$dataValue->setContextPage( |
363
|
|
|
$this->subject->getDataItem() |
|
|
|
|
364
|
|
|
); |
365
|
|
|
|
366
|
|
|
return ValueFormatter::getFormattedValue( $dataValue, $property, $incoming ); |
367
|
|
|
} |
368
|
|
|
|
369
|
|
|
/** |
370
|
|
|
* Displays the subject that is currently being browsed to. |
371
|
|
|
* |
372
|
|
|
* @return string A string containing the HTML with the subject line |
373
|
|
|
*/ |
374
|
|
|
private function displayHead() { |
375
|
|
|
|
376
|
|
|
$label = ValueFormatter::getFormattedSubject( $this->subject ); |
|
|
|
|
377
|
|
|
|
378
|
|
|
$html = "<div class=\"smw-table smwb-factbox\">" . |
379
|
|
|
"<div class=\"smw-table-header smwb-title\"><div class=\"smw-table-row\">" . |
380
|
|
|
$label . "\n" . |
381
|
|
|
"</div></div></div>"; |
382
|
|
|
|
383
|
|
|
return $html; |
384
|
|
|
} |
385
|
|
|
|
386
|
|
|
/** |
387
|
|
|
* Creates the HTML for the center bar including the links with further navigation options. |
388
|
|
|
* |
389
|
|
|
* @return string HTMl with the center bar |
390
|
|
|
*/ |
391
|
|
|
private function displayCenter( $article ) { |
392
|
|
|
|
393
|
|
|
if ( $this->showincoming ) { |
394
|
|
|
$parameters = array( |
395
|
|
|
'offset' => 0, |
396
|
|
|
'dir' => 'out', |
397
|
|
|
'article' => $article |
398
|
|
|
); |
399
|
|
|
|
400
|
|
|
$linkMsg = 'smw_browse_hide_incoming'; |
401
|
|
|
} else { |
402
|
|
|
$parameters = array( |
403
|
|
|
'offset' => $this->offset, |
404
|
|
|
'dir' => 'both', |
405
|
|
|
'article' => $article |
406
|
|
|
); |
407
|
|
|
|
408
|
|
|
$linkMsg = 'smw_browse_show_incoming'; |
409
|
|
|
} |
410
|
|
|
|
411
|
|
|
$html = FormHelper::createLink( $linkMsg, $parameters ); |
412
|
|
|
|
413
|
|
|
return "<a name=\"smw_browse_incoming\"></a>\n" . |
414
|
|
|
"<div class=\"smw-table smwb-factbox\">" . |
415
|
|
|
"<div class=\"smw-table-row smwb-center\"><div >" . $html . |
416
|
|
|
" \n" . "</div></div>\n" . "</div>\n"; |
417
|
|
|
} |
418
|
|
|
|
419
|
|
|
/** |
420
|
|
|
* Creates the HTML for the bottom bar including the links with further navigation options. |
421
|
|
|
* |
422
|
|
|
* @param[in] $more bool Are there more inproperties to be displayed? |
423
|
|
|
* @return string HTMl with the bottom bar |
424
|
|
|
*/ |
425
|
|
|
private function displayBottom( $more ) { |
426
|
|
|
|
427
|
|
|
$article = $this->subject->getLongWikiText(); |
|
|
|
|
428
|
|
|
|
429
|
|
|
$open = "<div class=\"smw-table smwb-factbox\">" . |
430
|
|
|
"<div class=\"smw-table-row smwb-center\"><div >"; |
431
|
|
|
|
432
|
|
|
$close = " \n" . "</div></div>\n" . "</div>\n"; |
433
|
|
|
$html = ''; |
434
|
|
|
|
435
|
|
|
if ( $this->getOption( 'showAll' ) ) { |
436
|
|
|
return $open . $close; |
437
|
|
|
} |
438
|
|
|
|
439
|
|
|
if ( ( $this->offset > 0 ) || $more ) { |
440
|
|
|
$offset = max( $this->offset - $this->incomingPropertiesCount + 1, 0 ); |
441
|
|
|
|
442
|
|
|
$parameters = array( |
443
|
|
|
'offset' => $offset, |
444
|
|
|
'dir' => $this->showoutgoing ? 'both' : 'in', |
445
|
|
|
'article' => $article |
446
|
|
|
); |
447
|
|
|
|
448
|
|
|
$linkMsg = 'smw_result_prev'; |
449
|
|
|
|
450
|
|
|
$html .= ( $this->offset == 0 ) ? wfMessage( $linkMsg )->escaped() : FormHelper::createLink( $linkMsg, $parameters ); |
451
|
|
|
|
452
|
|
|
$offset = $this->offset + $this->incomingPropertiesCount - 1; |
453
|
|
|
|
454
|
|
|
$parameters = array( |
455
|
|
|
'offset' => $offset, |
456
|
|
|
'dir' => $this->showoutgoing ? 'both' : 'in', |
457
|
|
|
'article' => $article |
458
|
|
|
); |
459
|
|
|
|
460
|
|
|
$linkMsg = 'smw_result_next'; |
461
|
|
|
|
462
|
|
|
// @todo FIXME: i18n patchwork. |
463
|
|
|
$html .= "     <strong>" . wfMessage( 'smw_result_results' )->escaped() . " " . ( $this->offset + 1 ) . |
464
|
|
|
" – " . ( $offset ) . "</strong>     "; |
465
|
|
|
$html .= $more ? FormHelper::createLink( $linkMsg, $parameters ) : wfMessage( $linkMsg )->escaped(); |
466
|
|
|
} |
467
|
|
|
|
468
|
|
|
return $open . $html . $close; |
469
|
|
|
} |
470
|
|
|
|
471
|
|
|
/** |
472
|
|
|
* Creates a Semantic Data object with the incoming properties instead of the |
473
|
|
|
* usual outproperties. |
474
|
|
|
* |
475
|
|
|
* @return array(SMWSemanticData, bool) The semantic data including all inproperties, and if there are more inproperties left |
|
|
|
|
476
|
|
|
*/ |
477
|
|
|
private function getInData() { |
478
|
|
|
$indata = new SemanticData( $this->subject->getDataItem() ); |
|
|
|
|
479
|
|
|
|
480
|
|
|
$propRequestOptions = new RequestOptions(); |
481
|
|
|
$propRequestOptions->sort = true; |
482
|
|
|
$propRequestOptions->limit = $this->incomingPropertiesCount; |
483
|
|
|
|
484
|
|
|
if ( $this->offset > 0 ) { |
485
|
|
|
$propRequestOptions->offset = $this->offset; |
486
|
|
|
} |
487
|
|
|
|
488
|
|
|
$incomingProperties = $this->store->getInProperties( $this->subject->getDataItem(), $propRequestOptions ); |
|
|
|
|
489
|
|
|
$more = false; |
490
|
|
|
|
491
|
|
|
if ( count( $incomingProperties ) == $this->incomingPropertiesCount ) { |
492
|
|
|
$more = true; |
493
|
|
|
array_pop( $incomingProperties ); // drop the last one |
494
|
|
|
} |
495
|
|
|
|
496
|
|
|
$valRequestOptions = new RequestOptions(); |
497
|
|
|
$valRequestOptions->sort = true; |
498
|
|
|
$valRequestOptions->limit = $this->incomingValuesCount; |
499
|
|
|
|
500
|
|
|
foreach ( $incomingProperties as $property ) { |
501
|
|
|
$values = $this->store->getPropertySubjects( $property, $this->subject->getDataItem(), $valRequestOptions ); |
|
|
|
|
502
|
|
|
foreach ( $values as $value ) { |
503
|
|
|
$indata->addPropertyObjectValue( $property, $value ); |
504
|
|
|
} |
505
|
|
|
} |
506
|
|
|
|
507
|
|
|
// Added in 2.3 |
508
|
|
|
// Whether to show a more link or not can be set via |
509
|
|
|
// SMW::Browse::BeforeIncomingPropertyValuesFurtherLinkCreate |
510
|
|
|
\Hooks::run( 'SMW::Browse::AfterIncomingPropertiesLookupComplete', array( $this->store, $indata, $valRequestOptions ) ); |
511
|
|
|
|
512
|
|
|
return array( $indata, $more ); |
513
|
|
|
} |
514
|
|
|
|
515
|
|
|
} |
516
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..