本文整理汇总了PHP中Kwc_Chained_Trl_Component类的典型用法代码示例。如果您正苦于以下问题:PHP Kwc_Chained_Trl_Component类的具体用法?PHP Kwc_Chained_Trl_Component怎么用?PHP Kwc_Chained_Trl_Component使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Kwc_Chained_Trl_Component类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: _getContentChild
private function _getContentChild()
{
$model = $this->getOwnModel();
$masterChild = $this->getData()->chained->getComponent()->getContentChild();
$c = Kwc_Chained_Trl_Component::getChainedByMaster($masterChild, $this->getData());
$page = $this->getData();
while ($c && (!$c->hasContent() || $this->_getSetting('hasVisible') && $c->parent->getComponent()->getRow() && !$c->parent->getComponent()->getRow()->visible)) {
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->getChildComponent('-' . $this->getData()->id)->getChildComponent(array('generator' => 'child'));
$c = Kwc_Chained_Trl_Component::getChainedByMaster($masterChild, $this->getData());
if ($page instanceof Kwf_Component_Data_Root) {
break;
}
$page = $page->parent;
}
return $c;
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:26,代码来源:Component.php
示例2: getTemplateVars
public function getTemplateVars()
{
$ret = parent::getTemplateVars();
$menu = array();
$masterMenu = $this->getData()->chained->getComponent()->getMenuData(null, array('ignoreVisible' => true));
foreach ($masterMenu as $m) {
$component = Kwc_Chained_Trl_Component::getChainedByMaster($m['data'], $this->getData());
if ($component) {
$m['submenu'] = array();
$masterSubMenu = $this->getData()->chained->getComponent()->getMenuData($m['data'], array('ignoreVisible' => true), 'Kwc_Menu_Expanded_EditableItems_Component');
foreach ($masterSubMenu as $sm) {
$sComponent = Kwc_Chained_Trl_Component::getChainedByMaster($sm['data'], $this->getData());
if ($sComponent) {
$sm['data'] = $sComponent;
$sm['text'] = $sComponent->name;
$m['submenu'][] = $sm;
}
}
$this->_attachEditableToMenuData($m['submenu']);
$m['data'] = $component;
$m['text'] = $component->name;
$menu[] = $m;
}
}
$ret['menu'] = $menu;
return $ret;
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:27,代码来源:Component.php
示例3: getLinkedData
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;
}
开发者ID:nsams,项目名称:koala-framework,代码行数:28,代码来源:DataAbstract.php
示例4: getLinkedData
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;
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:33,代码来源:DataAbstract.php
示例5: attachEditableToMenuData
public function attachEditableToMenuData(&$menuData)
{
foreach ($menuData as $k => &$m) {
if (isset($m['editable']) && $m['editable']) {
$m['editable'] = Kwc_Chained_Trl_Component::getChainedByMaster($m['editable'], $this->getData());
}
}
}
开发者ID:koala-framework,项目名称:koala-framework,代码行数:8,代码来源:Component.php
示例6: onMasterMediaCacheChanged
public function onMasterMediaCacheChanged(Kwf_Events_Event_Media_Changed $e)
{
foreach (Kwc_Chained_Trl_Component::getAllChainedByMaster($e->component, 'Trl') as $chained) {
if (!$chained->getComponent()->getRow()->own_download) {
$this->fireEvent(new Kwf_Events_Event_Media_Changed($this->_class, $chained));
}
}
}
开发者ID:koala-framework,项目名称:koala-framework,代码行数:8,代码来源:Events.php
示例7: getTemplateVars
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
{
$ret = parent::getTemplateVars($renderer);
$ret['link1'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link1'], $this->getData());
$ret['link4'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link4'], $this->getData());
$ret['link5'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link5'], $this->getData());
return $ret;
}
开发者ID:koala-framework,项目名称:koala-framework,代码行数:8,代码来源:Component.php
示例8: getTemplateVars
public function getTemplateVars()
{
$ret = parent::getTemplateVars();
$ret['link1'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link1'], $this->getData());
$ret['link4'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link4'], $this->getData());
$ret['link5'] = Kwc_Chained_Trl_Component::getChainedByMaster($ret['link5'], $this->getData());
return $ret;
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:8,代码来源:Component.php
示例9: duplicated
public static function duplicated(Kwf_Component_Data $source, Kwf_Component_Data $new)
{
$chained = Kwf_Component_Data_Root::getInstance()->getComponentsByClass('Kwc_Root_TrlRoot_Chained_Component', array('ignoreVisible' => true));
//bySameClass wenn fkt nicht mehr static (todo oben erledigt)
$sourceChained = array();
foreach ($chained as $c) {
$subRootAboveTrl = $c;
//eg. domain
while ($subRootAboveTrl = $subRootAboveTrl->parent) {
if (Kwc_Abstract::getFlag($subRootAboveTrl->componentClass, 'subroot')) {
break;
}
}
if (!$subRootAboveTrl) {
$subRootAboveTrl = Kwf_Component_Data_Root::getInstance();
}
$d = $source;
while ($d = $d->parent) {
if ($d->componentId == $subRootAboveTrl->componentId) {
$sourceChained[$c->getLanguage()] = $c;
}
}
}
$targetChained = array();
foreach ($chained as $c) {
$subRootAboveTrl = $c;
//eg. domain
while ($subRootAboveTrl = $subRootAboveTrl->parent) {
if (Kwc_Abstract::getFlag($subRootAboveTrl->componentClass, 'subroot')) {
break;
}
}
if (!$subRootAboveTrl) {
$subRootAboveTrl = Kwf_Component_Data_Root::getInstance();
}
$d = $new;
while ($d = $d->parent) {
if ($d->componentId == $subRootAboveTrl->componentId) {
if (isset($sourceChained[$c->getLanguage()])) {
//only if there is a source language
$targetChained[] = array('targetChained' => $c, 'sourceChained' => $sourceChained[$c->getLanguage()]);
}
}
}
}
foreach ($targetChained as $c) {
$sourceChained = Kwc_Chained_Trl_Component::getChainedByMaster($source, $c['sourceChained'], array('ignoreVisible' => true));
$newChained = Kwc_Chained_Trl_Component::getChainedByMaster($new, $c['targetChained'], array('ignoreVisible' => true));
if (!$sourceChained || $source->componentId == $sourceChained->componentId) {
continue;
//wenn sourceChained nicht gefunden handelt es sich zB um ein MasterAsChild - was ignoriert werden muss
}
if (!$newChained) {
throw new Kwf_Exception("can't find chained components");
}
Kwc_Admin::getInstance($newChained->componentClass)->duplicate($sourceChained, $newChained);
}
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:58,代码来源:Admin.php
示例10: _createData
protected function _createData($parentData, $row, $select)
{
$ret = parent::_createData($parentData, $row, $select);
$ret->targetPage = Kwc_Chained_Trl_Component::getChainedByMaster($row->targetPage, $parentData, array('ignoreVisible' => $select->getPart(Kwf_Component_Select::IGNORE_VISIBLE)));
if (!$ret->targetPage) {
return null;
}
return $ret;
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:9,代码来源:Generator.php
示例11: getTemplateVars
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
{
$ret = parent::getTemplateVars($renderer);
$ret['paypalButton'] = $this->_getPaypalButton();
$ret['options'] = array('controllerUrl' => Kwc_Admin::getInstance($this->getData()->componentClass)->getControllerUrl() . '/json-confirm-order', 'params' => array('paymentComponentId' => $this->getData()->parent->componentId));
return $ret;
}
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php
示例12: getTemplateVars
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
{
$ret = parent::getTemplateVars($renderer);
$ret['workingPosition'] = $this->_getRow()->working_position;
$ret['vcard'] = $this->getData()->getChildComponent('_vcard');
return $ret;
}
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php
示例13: getSettings
public static function getSettings($masterComponentClass = null)
{
$ret = parent::getSettings($masterComponentClass);
$ret['ownModel'] = 'Kwf_Component_FieldModel';
$ret['generators']['mail'] = array('class' => 'Kwf_Component_Generator_Static', 'component' => 'Kwc_Mail_Trl_Mail_Component.' . $masterComponentClass);
return $ret;
}
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php
示例14: getTemplateVars
public function getTemplateVars()
{
$ret = parent::getTemplateVars();
$page = $this->getData()->getPage();
$ret['childPages'] = $page->getChildPages();
return $ret;
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php
示例15: getTemplateVars
public function getTemplateVars()
{
$ret = parent::getTemplateVars();
$ret['imageUrl'] = $this->getImageUrl();
$ret['imagePage'] = $this->getData()->getChildComponent('_imagePage');
return $ret;
}
开发者ID:nsams,项目名称:koala-framework,代码行数:7,代码来源:Component.php
示例16: getTemplateVars
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
{
$ret = parent::getTemplateVars($renderer);
$ret['imageUrl'] = $this->getImageUrl();
$ret['imagePage'] = $this->getData()->getChildComponent('_imagePage');
return $ret;
}
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php
示例17: getSettings
public static function getSettings($masterComponent)
{
$ret = parent::getSettings($masterComponent);
$ret['ownModel'] = new Kwf_Model_FnF(array('primaryKey' => 'component_id'));
$ret['componentName'] = 'Test Trl';
return $ret;
}
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:7,代码来源:Component.php
示例18: getTemplateVars
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
{
$ret = parent::getTemplateVars($renderer);
$page = $this->getData()->getPage();
$ret['childPages'] = $page->getChildPages();
return $ret;
}
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php
示例19: getSettings
public static function getSettings($masterComponentClass)
{
$ret = parent::getSettings($masterComponentClass);
$ret['generators']['page']['class'] = 'Kwc_Root_Category_Trl_Generator';
$ret['generators']['page']['model'] = 'Kwc_Root_Category_Trl_GeneratorModel';
return $ret;
}
开发者ID:nsams,项目名称:koala-framework,代码行数:7,代码来源:Component.php
示例20: getTemplateVars
public function getTemplateVars(Kwf_Component_Renderer_Abstract $renderer)
{
$ret = parent::getTemplateVars($renderer);
$ret['headline1'] = $this->_getRow()->headline1;
$ret['headline2'] = $this->_getRow()->headline2;
return $ret;
}
开发者ID:koala-framework,项目名称:koala-framework,代码行数:7,代码来源:Component.php
注:本文中的Kwc_Chained_Trl_Component类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论