sfWidget系クラスごとの必須オプション/対応オプションの調べ方
例:sfWidgetFormChoice
~SYMFONY_LIB_DIR/widget/sfWidgetFormChoice.class.php
configureメソッドが以下のように定義されています。
<?php 41 protected function configure($options = array(), $attributes = array()) 42 { 43 $this->addRequiredOption('choices'); 44 45 $this->addOption('multiple', false); 46 $this->addOption('expanded', false); 47 $this->addOption('renderer_class', false); 48 $this->addOption('renderer_options', array()); 49 $this->addOption('renderer', false); 50 } ?>
つまり、sfWidgetFormChoiceクラスでは、
- choicesが必須オプション
- multiple、expanded、render_class、render_options、rendererがサポートされるオプション
となっていて、共通オプションと上記以外のオプション名が指定された場合はエラーになります。