Пример #1
0
 protected function _initFields()
 {
     $this->setCreateMissingRow(true);
     parent::_initFields();
     $tagsControllerUrl = Kwc_Abstract_Admin::getInstance($this->getClass())->getControllerUrl();
     $this->add(new Kwf_Form_Field_SuperBoxSelect('ComponentToTag', 'Tag', trlKwf('Tags')))->setWidth(300)->setListWidth(300)->setTpl('<tpl for="."><div class="x2-combo-list-item">{name} <span style="font-size: 10px; color: gray;">({count_used} ' . trlKwf('uses') . ')</span></div></tpl>')->setAllowAddNewData(true)->setTriggerAction('all')->setMinChars(1)->setValues($tagsControllerUrl . '/json-data')->setAddNewItemUrl($tagsControllerUrl . '/json-add-item');
 }
Пример #2
0
 public function duplicate($source, $target, Zend_ProgressBar $progressBar = null)
 {
     //pages are not duplicated because they are not returned by 'inherit'=>false
     //so duplicate them here
     $s = array('generatorFlags' => array('pageGenerator' => true), 'ignoreVisible' => true);
     foreach ($source->getChildComponents($s) as $c) {
         $c->generator->duplicateChild($c, $target, $progressBar);
     }
     parent::duplicate($source, $target, $progressBar);
 }
Пример #3
0
 protected function _duplicateOwnRow($source, $target)
 {
     $ret = parent::_duplicateOwnRow($source, $target);
     if (!$ret) {
         return $ret;
     }
     //these meta tags should not get duplicated
     $ret->description = null;
     $ret->og_title = null;
     $ret->og_description = null;
     $ret->save();
     return $ret;
 }
Пример #4
0
 public function duplicate($source, $target, $progressBar = null)
 {
     parent::duplicate($source, $target, $progressBar);
     $this->_duplicated[] = array('source' => $source->componentId, 'target' => $target->componentId);
 }