protected function _initFields() { parent::_initFields(); $categories = $this->_getCategories(); if (count($categories) > 1) { $this->add(new Kwf_Form_Field_MultiCheckbox('ToCategory', 'Category', trlKwfStatic('Categories')))->setValues($categories)->setWidth(255)->setAllowBlank(false); } }
protected function _initFields() { parent::_initFields(); $model = Kwf_Component_Model::getInstance('Kwc_NewsletterCategory_CategoriesModel'); $s = $model->select()->whereEquals('newsletter_component_id', $this->_newsletterComponentId)->order('pos'); $categories = array(); foreach ($model->getRows($s) as $row) { $categories[$row->id] = $row->category; } $this->add(new Kwf_Form_Field_MultiCheckbox('ToCategory', 'Category', trlKwf('Categories')))->setValues($categories)->setWidth(255)->setAllowBlank(false); }
public function __construct($name, $componentClass) { parent::__construct($name, $componentClass, null); }