Index: trunk/extensions/SemanticMediaWiki/includes/parserhooks/SMW_SMWDoc.php |
— | — | @@ -62,6 +62,10 @@ |
63 | 63 | $params['language'] = new Parameter( 'language' ); |
64 | 64 | $params['language']->setDefault( $GLOBALS['wgLanguageCode'] ); |
65 | 65 | $params['language']->setMessage( 'smw-smwdoc-par-language' ); |
| 66 | + |
| 67 | + $params['parameters'] = new Parameter( 'parameters', Parameter::TYPE_STRING, 'specific' ); |
| 68 | + $params['parameters']->setMessage( 'smw-smwdoc-par-parameters' ); |
| 69 | + $params['parameters']->addCriteria( new CriterionInArray( 'all', 'specific', 'base' ) ); |
66 | 70 | |
67 | 71 | return $params; |
68 | 72 | } |
— | — | @@ -75,7 +79,7 @@ |
76 | 80 | * @return array |
77 | 81 | */ |
78 | 82 | protected function getDefaultParameters( $type ) { |
79 | | - return array( 'format', 'language' ); |
| 83 | + return array( 'format', 'language', 'parameters' ); |
80 | 84 | } |
81 | 85 | |
82 | 86 | /** |
— | — | @@ -91,7 +95,15 @@ |
92 | 96 | public function render( array $parameters ) { |
93 | 97 | $this->language = $parameters['language']; |
94 | 98 | |
95 | | - $params = $this->getFormatParameters( $parameters['format'] ); |
| 99 | + $params = array(); |
| 100 | + |
| 101 | + if ( in_array( $parameters['parameters'], array( 'all', 'base' ) ) ) { |
| 102 | + $params = array_merge( $params, SMWQueryProcessor::getParameters() ); |
| 103 | + } |
| 104 | + |
| 105 | + if ( in_array( $parameters['parameters'], array( 'all', 'specific' ) ) ) { |
| 106 | + $params = array_merge( $params, $this->getFormatParameters( $parameters['format'] ) ); |
| 107 | + } |
96 | 108 | |
97 | 109 | return $this->getParameterTable( $params ); |
98 | 110 | } |
Index: trunk/extensions/SemanticMediaWiki/languages/SMW_Messages.php |
— | — | @@ -93,6 +93,7 @@ |
94 | 94 | 'smw-paramdesc-dsv-filename' => 'The name for the DSV file', |
95 | 95 | 'smw-smwdoc-description' => 'Shows a table of all parameters that can be used for the specified result format together with default values and descriptions.', |
96 | 96 | 'smw-smwdoc-par-format' => 'The result format to display parameter documentation for.', |
| 97 | + 'smw-smwdoc-par-parameters' => 'Which parameters to show. "specific" for those added by the format, "base" for those available in all formats, and "all" for both.', |
97 | 98 | 'smw-paramdesc-sort' => 'Property to sort the query by', |
98 | 99 | 'smw-paramdesc-order' => 'Order of the query sort', |
99 | 100 | 'smw-paramdesc-searchlabel' => 'Text for continuing the search (default is «… further results»)', |