public function getGeneratorFlags()
 {
     $ret = parent::getGeneratorFlags();
     $ret['showInPageTreeAdmin'] = true;
     $ret['showInLinkInternAdmin'] = true;
     return $ret;
 }
Пример #2
0
 protected function _formatSelect($parentData, $select)
 {
     $select = parent::_formatSelect($parentData, $select);
     if (!$parentData) {
         throw new Kwf_Exception('ParentData is null, this should not happen');
     }
     $select->whereEquals('subroot', $parentData);
     return $select;
 }
Пример #3
0
 protected function _formatConfig($parentData, $row)
 {
     $ret = parent::_formatConfig($parentData, $row);
     $ret['targetPage'] = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($row->target_page_id, array('subroot' => $parentData, 'limit' => 1));
     if (!$ret['targetPage']) {
         return null;
     }
     //can happen if page was deleted but entry still exists
     return $ret;
 }
Пример #4
0
 public function getChildData($parentData, $select = array())
 {
     if (is_array($select)) {
         $select = new Kwf_Component_Select($select);
     }
     if (!$parentData && !$select->hasPart(Kwf_Component_Select::WHERE_CHILD_OF) && !$select->hasPart(Kwf_Component_Select::WHERE_ID)) {
         $e = new Kwf_Exception("Looking up components generated by List is slow, and must be avoided.");
         $e->logOrThrow();
     }
     return parent::getChildData($parentData, $select);
 }
Пример #5
0
 protected function _formatSelect($parentData, $select)
 {
     $ret = parent::_formatSelect($parentData, $select);
     if (!$ret) {
         return $ret;
     }
     $session = new Kwf_Session_Namespace('kwcShopCart');
     if (!$session->orderId) {
         return null;
     }
     $ret->whereEquals('shop_order_id', Kwc_Shop_Cart_Orders::getCartOrderId());
     return $ret;
 }
Пример #6
0
 protected function _createData($parentData, $row, $select)
 {
     $ret = parent::_createData($parentData, $row, $select);
     $ignoreVisible = false;
     if ($select->hasPart('ignoreVisible')) {
         $ignoreVisible = $select->getPart('ignoreVisible');
     }
     $ret->targetPage = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($row->target_page_id, array('subroot' => $parentData, 'limit' => 1, 'ignoreVisible' => $ignoreVisible));
     if (!$ret->targetPage) {
         return null;
     }
     //can happen if page was deleted but entry still exists
     return $ret;
 }
Пример #7
0
 protected function _formatConfig($parentData, $row)
 {
     $ret = parent::_formatConfig($parentData, $row);
     $ret['targetPage'] = Kwf_Component_Data_Root::getInstance()->getComponentById($row->target_page_id);
     return $ret;
 }
Пример #8
0
 public function getGeneratorFlags()
 {
     $ret = parent::getGeneratorFlags();
     $ret['pseudoPage'] = true;
     return $ret;
 }