当前位置: 首页>>代码示例>>PHP>>正文


PHP Kwc_Admin::getDependsOnRowInstances方法代码示例

本文整理汇总了PHP中Kwc_Admin::getDependsOnRowInstances方法的典型用法代码示例。如果您正苦于以下问题:PHP Kwc_Admin::getDependsOnRowInstances方法的具体用法?PHP Kwc_Admin::getDependsOnRowInstances怎么用?PHP Kwc_Admin::getDependsOnRowInstances使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Kwc_Admin的用法示例。


在下文中一共展示了Kwc_Admin::getDependsOnRowInstances方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getComponentsDependingOnRow

 public function getComponentsDependingOnRow()
 {
     $ret = array();
     foreach (Kwc_Admin::getDependsOnRowInstances() as $a) {
         foreach ($a->getComponentsDependingOnRow($this) as $i) {
             if ($i) {
                 $ret[] = $i;
             }
         }
     }
     //unterseiten
     foreach ($this->getChildNodes() as $c) {
         $ret = array_merge($ret, $c->getComponentsDependingOnRow());
     }
     //rekursive links ignorieren
     foreach ($ret as $k => $r) {
         while ($r) {
             if ($r->componentId == $this->id) {
                 unset($ret[$k]);
                 break;
             }
             $r = $r->parent;
         }
     }
     return array_values($ret);
 }
开发者ID:koala-framework,项目名称:koala-framework,代码行数:26,代码来源:GeneratorRow.php

示例2: _checkRowIndependence

 private function _checkRowIndependence(Kwf_Model_Row_Interface $row, $msgMethod)
 {
     $c = Kwf_Component_Data_Root::getInstance()->getComponentByDbId($this->_getParam('componentId'));
     // wenn zB Newsletter statisch in root erstellt wurde, gibts kein visible
     if (!$c) {
         //wenn seite offline ist ignorieren
         //  ist nicht natürlich nicht korrekt, wir *müssten* die überprüfung
         //  nachholen, sobald die seite online gestellt wird
         return;
     }
     $components = array();
     foreach (Kwc_Admin::getDependsOnRowInstances() as $a) {
         if ($a instanceof Kwf_Component_Abstract_Admin_Interface_DependsOnRow) {
             $components = array_merge($components, $a->getComponentsDependingOnRow($row));
         }
     }
     $g = Kwc_Abstract::getSetting($this->_getParam('class'), 'generators');
     if (isset($g['detail']['dbIdShortcut'])) {
         //wenn auf sich selbst verlinkt ignorieren
         foreach ($components as $k => &$c) {
             $c = $c->getPage();
             $news = Kwf_Component_Data_Root::getInstance()->getComponentsByDbId($g['detail']['dbIdShortcut'] . $row->id);
             foreach ($news as $n) {
                 if ($c->componentId == $n->getPage()->componentId) {
                     unset($components[$k]);
                 }
             }
         }
     }
     if ($components) {
         $msg = trlKwf("You can not {0} this entry as it is used on the following pages:", $msgMethod);
         $msg .= Kwf_Util_Component::getHtmlLocations($components);
         throw new Kwf_ClientException($msg);
     }
 }
开发者ID:xiaoguizhidao,项目名称:koala-framework,代码行数:35,代码来源:Controller.php


注:本文中的Kwc_Admin::getDependsOnRowInstances方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。