コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 public function __construct($name, $componentClass)
 {
     parent::__construct($name, $componentClass, null);
 }