Example #1
0
 public function setModel($model)
 {
     parent::setModel($model);
     if ($this->_cards) {
         foreach ($this->_cards as $c) {
             $c->getIterator()->current()->setModel($model);
         }
     }
 }
Example #2
0
 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setAllowBlank(false)->setWidth(300);
     $this->add(new Kwf_Form_Field_TextArea('teaser', trlKwf('Teaser')))->setWidth(300)->setHeight(100);
     $this->add(new Kwf_Form_Field_DateField('publish_date', trlKwf('Publish Date')))->setAllowBlank(false);
     if (Kwc_Abstract::getSetting($this->getDirectoryClass(), 'enableExpireDate')) {
         $this->add(new Kwf_Form_Field_DateField('expiry_date', trlKwf('Expiry Date')));
     }
 }
Example #3
0
 protected function _createChildComponentForm($id, $name = null)
 {
     $ret = parent::_createChildComponentForm($id, $name);
     $ret->setIdTemplate('{0}' . $id);
     return $ret;
 }
Example #4
0
 protected function _initFields()
 {
     parent::_initFields();
     $this->add(new Kwf_Form_Field_TextField('title', trlKwf('Title')))->setAllowBlank(false)->setWidth(300);
     $this->add(new Kwf_Form_Field_DateField('publish_date', trlKwf('Publish Date')))->setAllowBlank(false);
 }