Conditions | 3 |
Paths | 4 |
Total Lines | 28 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | static function getQueryResults( $query_string, array $properties_to_display, $display_title ) { |
||
17 | // We use the Semantic MediaWiki Processor |
||
18 | $params = array(); |
||
19 | $inline = true; |
||
20 | $printouts = array(); |
||
21 | |||
22 | // add the page name to the printouts |
||
23 | if ( $display_title ) { |
||
24 | \SMWQueryProcessor::addThisPrintout( $printouts, $params ); |
||
25 | } |
||
26 | |||
27 | // Push the properties to display in the printout array. |
||
28 | foreach ( $properties_to_display as $property ) { |
||
29 | $to_push = new \SMWPrintRequest( |
||
30 | \SMWPrintRequest::PRINT_PROP, |
||
31 | $property, |
||
32 | \SMW\DataValueFactory::getInstance()->newPropertyValueByLabel( $property ) |
||
33 | ); |
||
34 | array_push( $printouts, $to_push ); |
||
35 | } |
||
36 | |||
37 | $params = \SMWQueryProcessor::getProcessedParams( $params, $printouts ); |
||
38 | |||
39 | $query = \SMWQueryProcessor::createQuery( $query_string, $params, $inline, null, $printouts ); |
||
40 | $results = smwfGetStore()->getQueryResult( $query ); |
||
41 | |||
42 | return $results; |
||
43 | } |
||
44 | } |
||
45 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.