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; }
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; }
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; }
protected function _getSearchDirectory() { $ret = $this->getData()->chained->getComponent()->getSearchDirectory(); $ret = Kwc_Chained_Cc_Component::getChainedByMaster($ret, $this->getData(), array('ignoreVisible' => true)); return $ret; }
public function getTemplateVars() { $ret = parent::getTemplateVars(); $ret['searchPage'] = Kwc_Chained_Cc_Component::getChainedByMaster($ret['searchPage'], $this->getData(), array('ignoreVisible' => true)); return $ret; }