Hey guys, especially Validator lovers and especially Jeroen! If I understand correctly we can now use this beautiful function SMWResultPrinter::getParamDefinitions in our result printers to validate if all the parameters of {{#ask}} function is ok. Typically the text of overrided getParamDefinitions function looks like that:
public function getParamDefinitions( array $definitions ) { $params = parent::getParamDefinitions( $definitions ); $definitions['limit']->setDefault( $GLOBALS['smwgQMaxInlineLimit'] ); $definitions['link']->setDefault( 'none' ); $definitions['headers']->setDefault( 'hide' ); ### new params: ### $params['titles'] = array( 'message' => 'srf_paramdesc_pagetitle', 'values' => array( 'show', 'hide' ), 'aliases' => array( 'pagetitle', 'pagetitles' ), 'default' => 'show', ); $params['hidegaps'] = array( 'message' => 'srf_paramdesc_hidegaps', 'values' => array( 'none', 'all', 'property', 'record' ), 'default' => 'none', 'manipulatedefault' => false, ); } It looks like magic for me but I feel that these are very powerful spells. Where did these words 'message', 'values', 'default', 'aliases' come from? What values can I use for the values of the key 'default'? Are there any other interesting words to use (for example 'mandatory' would be nice or 'type')? Is there any documentation on that anywhere? Cheers, ----- Yury Katkov, WikiVote ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ Semediawiki-devel mailing list Semediawiki-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/semediawiki-devel