Exemplo n.º 1
0
 public static function getSettings($masterComponentClass)
 {
     $ret = parent::getSettings($masterComponentClass);
     $ret['flags']['hasBaseProperties'] = true;
     $ret['baseProperties'] = array('language');
     return $ret;
 }
Exemplo n.º 2
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['child'] = $this->getData()->getChildComponent(array('generator' => 'child'));
     $ret['linkTag'] = $ret['child'];
     return $ret;
 }
Exemplo n.º 3
0
 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['child'] = $this->getData()->getChildComponent(array('generator' => 'child'));
     $ret['linkTag'] = $ret['child'];
     return $ret;
 }
 public final function getLinkedData()
 {
     if (!isset($this->_data)) {
         $masterLinkData = $this->chained->getLinkedData(array('ignoreVisible' => true));
         if (!$masterLinkData) {
             $this->_data = false;
         }
         if ($masterLinkData) {
             if (is_null($this->_type)) {
                 throw new Kwf_Exception("_type may not be null");
             }
             if ($this->_type == 'Trl') {
                 $linkComponent = Kwc_Chained_Trl_Component::getChainedByMaster($masterLinkData, $this);
             } else {
                 if ($this->_type == 'Cc') {
                     $linkComponent = Kwc_Chained_Cc_Component::getChainedByMaster($masterLinkData, $this);
                 }
             }
             if (!$linkComponent) {
                 $this->_data = false;
                 //kann offline sein
             } else {
                 $this->_data = $linkComponent;
             }
         }
     }
     $m = Kwc_Abstract::createModel($this->chained->componentClass);
     $result = $m->fetchColumnsByPrimaryId(array('anchor'), $this->chained->dbId);
     if ($result['anchor']) {
         $this->_anchor = $result['anchor'];
     }
     return $this->_data;
 }
Exemplo n.º 5
0
 public final function getLinkedData()
 {
     if (!isset($this->_data)) {
         $masterLinkData = $this->chained->getLinkedData(array('ignoreVisible' => true));
         if (!$masterLinkData) {
             $this->_data = false;
         }
         if ($masterLinkData) {
             if (is_null($this->_type)) {
                 throw new Kwf_Exception("_type may not be null");
             }
             if ($this->_type == 'Trl') {
                 $linkComponent = Kwc_Chained_Trl_Component::getChainedByMaster($masterLinkData, $this);
             } else {
                 if ($this->_type == 'Cc') {
                     $linkComponent = Kwc_Chained_Cc_Component::getChainedByMaster($masterLinkData, $this);
                 }
             }
             if (!$linkComponent) {
                 $this->_data = false;
                 //kann offline sein
             } else {
                 $this->_data = $linkComponent;
             }
         }
     }
     return $this->_data;
 }
Exemplo n.º 6
0
 private function _getContentChild()
 {
     $masterChild = $this->getData()->chained->chained->getComponent()->getContentChild();
     $c = Kwc_Chained_Cc_Component::getChainedByMaster($masterChild, $this->getData());
     $page = $this->getData();
     while ($c && !$c->hasContent()) {
         while ($page && !$page->inherits) {
             $page = $page->parent;
             if ($page instanceof Kwf_Component_Data_Root) {
                 break;
             }
         }
         if (!isset($page->chained)) {
             $c = null;
             break;
         }
         $masterChild = $page->chained->chained->getChildComponent('-' . $this->getData()->id)->getChildComponent(array('generator' => 'child'));
         $c = Kwc_Chained_Cc_Component::getChainedByMaster($masterChild, $this->getData());
         if ($page instanceof Kwf_Component_Data_Root) {
             break;
         }
         $page = $page->parent;
     }
     return $c;
 }
Exemplo n.º 7
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $searchPage = $this->_getSearchDirectory();
     $ret['searchForm'] = $searchPage->getChildComponent('-view')->getChildComponent('-searchForm');
     $ret['config']['searchTitle'] = $searchPage->getTitle();
     $ret['config']['searchUrl'] = $searchPage->url;
     return $ret;
 }
Exemplo n.º 8
0
 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     foreach ($this->getData()->getChildComponents(array('generator' => 'child')) as $c) {
         if (isset($ret[$c->id]) && $ret[$c->id]) {
             $ret[$c->id] = $c;
         }
         // Bei TextImage kann zB. Bild ausgeblendet werden und soll dann in Übersetzung auch nicht angezeigt werden
     }
     return $ret;
 }
Exemplo n.º 9
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $childs = $this->getData()->getChildComponents();
     foreach ($ret['contentParts'] as $kPart => $part) {
         if (is_array($part)) {
             $component = self::getChainedByMaster($part['component'], $this->getData(), array('ignoreVisible' => true));
             $ret['contentParts'][$kPart]['component'] = $component;
         }
     }
     return $ret;
 }
Exemplo n.º 10
0
 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $paragraphs = $this->getData()->getChildComponents(array('generator' => 'paragraphs'));
     $paragraphsById = array();
     foreach ($paragraphs as $c) {
         $paragraphsById[$c->id] = $c;
     }
     foreach (array_keys($ret['paragraphs']) as $key) {
         $ret['paragraphs'][$key]['data'] = $paragraphsById[$ret['paragraphs'][$key]['data']->id];
     }
     return $ret;
 }
Exemplo n.º 11
0
 public static function getSettings($categoryComponentClass = 'Kwc_Root_Category_Component')
 {
     $ret = parent::getSettings($categoryComponentClass);
     $ret['ownModel'] = 'Kwf_Component_FieldModel';
     $pageGenerator = Kwc_Chained_Cc_Component::createChainedGenerator($categoryComponentClass, 'page');
     $ret['generators']['target'] = $pageGenerator;
     $ret['generators']['target']['class'] = 'Kwc_Chained_CopyPages_TargetGenerator';
     $ret['generators']['target']['inherit'] = false;
     $ret['generators']['page'] = $pageGenerator;
     $ret['generators']['page']['class'] = 'Kwc_Chained_CopyTarget_PagesGenerator';
     $ret['flags']['hasAllChainedByMaster'] = true;
     return $ret;
 }
Exemplo n.º 12
0
 public static function getSettings($includePageGenerator = 'Kwc_Root_Category_Component')
 {
     $ret = parent::getSettings();
     $ret['generators']['target'] = array('class' => 'Kwc_Chained_CopyTarget_TargetGenerator', 'component' => null);
     if ($includePageGenerator) {
         $pageGenerator = Kwc_Chained_Cc_Component::createChainedGenerator($includePageGenerator, 'page');
         if ($pageGenerator) {
             $ret['generators']['page'] = $pageGenerator;
             $ret['generators']['page']['class'] = 'Kwc_Chained_CopyTarget_PagesGenerator';
         }
     }
     $ret['flags']['hasAllChainedByMaster'] = true;
     return $ret;
 }
Exemplo n.º 13
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $children = $this->getData()->getChildComponents(array('generator' => 'child'));
     // wird zweimal gesetzt. siehe kommentar in nicht-trl component
     $ret['children'] = $children;
     $childrenById = array();
     foreach ($children as $c) {
         $childrenById[$c->id] = $c;
     }
     foreach (array_keys($ret['listItems']) as $k) {
         $ret['listItems'][$k]['data'] = $childrenById[$ret['listItems'][$k]['data']->id];
     }
     return $ret;
 }
Exemplo n.º 14
0
 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['action'] = $this->getData()->url;
     return $ret;
 }
Exemplo n.º 15
0
 public static function getSettings($masterComponentClass = null)
 {
     $ret = parent::getSettings($masterComponentClass);
     $ret['dataClass'] = 'Kwc_Basic_LinkTag_FirstChildPage_Data';
     return $ret;
 }
Exemplo n.º 16
0
 public static function getSettings($masterComponentClass)
 {
     $ret = parent::getSettings($masterComponentClass);
     $ret['dataClass'] = 'Kwc_Basic_LinkTag_Abstract_Cc_Data';
     return $ret;
 }
Exemplo n.º 17
0
 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['child'] = $this->getData()->getChildComponent('-child');
     return $ret;
 }
Exemplo n.º 18
0
 public static function getSettings($masterComponent = null)
 {
     $ret = parent::getSettings($masterComponent);
     $ret['dataClass'] = 'Kwc_Basic_LinkTag_Intern_Trl_Cc_Data';
     return $ret;
 }
Exemplo n.º 19
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['action'] = $this->getData()->url;
     return $ret;
 }
Exemplo n.º 20
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['searchPage'] = Kwc_Chained_Cc_Component::getChainedByMaster($ret['searchPage'], $this->getData(), array('ignoreVisible' => true));
     return $ret;
 }
Exemplo n.º 21
0
 public static function getSettings($masterComponentClass = null)
 {
     $ret = parent::getSettings($masterComponentClass);
     $ret['generators']['page']['class'] = 'Kwc_Root_Category_Cc_Generator';
     return $ret;
 }
Exemplo n.º 22
0
 public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
 {
     $ret = parent::getTemplateVars($renderer);
     $ret['parentPage'] = self::getChainedByMaster($ret['parentPage'], $this->getData());
     return $ret;
 }
Exemplo n.º 23
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['child'] = $this->getData()->getChildComponent('-child');
     return $ret;
 }
Exemplo n.º 24
0
 public function getTemplateVars()
 {
     $ret = parent::getTemplateVars();
     $ret['parentPage'] = self::getChainedByMaster($ret['parentPage'], $this->getData());
     return $ret;
 }