當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。