コード例 #1
0
 protected function buildForm()
 {
     parent::buildForm(true);
     $this->formBuilder->add("id", "hidden", array("constraints" => array(new GreaterThan(array('value' => 0)))))->add("by_module", "checkbox", array("label" => Translator::getInstance()->trans("By Module"), "label_attr" => array("for" => "by_module")))->add("block", "checkbox", array("label" => Translator::getInstance()->trans("Hook block"), "label_attr" => array("for" => "block")));
     // Add standard description fields, excluding title and locale, which a re defined in parent class
     $this->addStandardDescFields(array('title', 'postscriptum', 'locale'));
 }
コード例 #2
0
 protected function buildForm()
 {
     parent::buildForm(true);
     $this->formBuilder->add("id", "hidden", array("constraints" => array(new GreaterThan(array('value' => 0)))))->add("by_module", "checkbox", array("label" => Translator::getInstance()->trans("By Module"), "required" => false, "label_attr" => array("for" => "by_module", "help" => Translator::getInstance()->trans("This hook is specific to a module (delivery/payment modules)."))))->add("block", "checkbox", array("label" => Translator::getInstance()->trans("Hook block"), "required" => false, "label_attr" => array("for" => "block", "help" => Translator::getInstance()->trans("If checked, this hook will be used by a hook block. If not, by hook function."))));
     // Add standard description fields, excluding title and locale, which a re defined in parent class
     $this->addStandardDescFields(array('title', 'postscriptum', 'locale'));
 }