Example #1
0
 public function getGeneratorFlags()
 {
     $ret = parent::getGeneratorFlags();
     $ret['box'] = true;
     return $ret;
 }
Example #2
0
 public function duplicateChild($source, $parentTarget, Zend_ProgressBar $progressBar = null)
 {
     if ($source->generator !== $this) {
         throw new Kwf_Exception("you must call this only with the correct source");
     }
     $sourceRow = $this->_getModel()->getRow($source->dbId);
     if ($sourceRow) {
         //if not row exists that's ok, it's also not needed in the duplicated one
         $targetId = $parentTarget->dbId . $this->_idSeparator . $source->id;
         $targetRow = $this->_getModel()->getRow($targetId);
         if ($targetRow) {
             $targetRow->delete();
         }
         $sourceRow->duplicate(array('component_id' => $targetId));
     }
     return parent::duplicateChild($source, $parentTarget, $progressBar);
 }
 protected function _formatSelect($parentData, $select = array())
 {
     if ($select->hasPart(Kwf_Component_Select::WHERE_COMPONENT_CLASSES)) {
         $cc = $select->getPart(Kwf_Component_Select::WHERE_COMPONENT_CLASSES);
         if (!is_array($parentData) || count($parentData) == 1) {
             if (is_array($parentData)) {
                 $pd = $parentData[0];
             } else {
                 $pd = $parentData;
             }
             $component = $this->_getModel()->fetchColumnByPrimaryId('component', $pd->dbId);
             if (!$component || !in_array($this->_settings['component'][$component], $cc)) {
                 return null;
             }
         }
     }
     return parent::_formatSelect($parentData, $select);
 }
Example #4
0
 public function getGeneratorFlags()
 {
     $ret = parent::getGeneratorFlags();
     $ret['pseudoPage'] = true;
     return $ret;
 }
 protected function _formatConfig($parentData, $row)
 {
     $ret = parent::_formatConfig($parentData, $row);
     $ret['chained'] = $parentData->getComponent()->getTargetComponent();
     return $ret;
 }