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


PHP Control::attached方法代码示例

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


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

示例1: attached

 protected function attached($presenter)
 {
     parent::attached($presenter);
     if (!$presenter instanceof Presenter) {
         return;
     }
     //připojen presenter
     if (!isset($presenter->page)) {
         throw new InvalidStateException('MetaControl attached to uncompatible Presenter');
     }
     $this->page = $presenter->page;
 }
开发者ID:osmcz,项目名称:website,代码行数:12,代码来源:MetaControl.php

示例2: attached

 protected function attached($presenter)
 {
     parent::attached($presenter);
     if (!$presenter instanceof Presenter) {
         return;
     }
     //připojen presenter
     if (!isset($presenter->page)) {
         throw new InvalidStateException('ShopControl attached to uncompatible Presenter');
     }
     $this->page = $presenter->page;
     $this->template->page = $presenter->page;
     $this->template->lang = $presenter->lang;
     $this->template->setTranslator(new TranslationsModel($presenter->lang));
 }
开发者ID:osmcz,项目名称:website,代码行数:15,代码来源:ShopPlugin.php

示例3: attached

 protected function attached($presenter)
 {
     parent::attached($presenter);
     if (!$presenter instanceof Presenter) {
         return;
     }
     //připojen presenter
     if (!isset($presenter->page)) {
         throw new InvalidStateException('FieldsPlugin attached to uncompatible Presenter');
     }
     $this->page = $presenter->page;
     $this->template->page = $presenter->page;
     $this->template->lang = $presenter->lang;
     $this->template->setTranslator(new TranslationsModel($presenter->lang));
     //parse fields
     $json = $this->page->getParent()->getMeta('.sectionFields');
     $sectionFields = array();
     try {
         if ($json) {
             $sectionFields = Neon::decode($json);
         }
     } catch (Exception $e) {
         $m = htmlspecialchars($e->getMessage());
         $this->error .= "<div class='control-group' title=\"{$m}\">.sectionFields not valid</div>";
     }
     $fields = array();
     $json = $this->page->getMeta('.fields');
     try {
         if ($json) {
             $fields = Neon::decode($json);
         }
     } catch (Exception $e) {
         $m = htmlspecialchars($e->getMessage() . "\"");
         $this->error .= "<div class='control-group' title=\"{$m}\">.fields not valid</div>";
     }
     $fields = array_merge($fields, $sectionFields);
     foreach ($fields as $k => $f) {
         if (substr($k, -1) == '_') {
             $k .= $this->page->lang;
         }
         $this->fields[$k] = $f;
     }
 }
开发者ID:osmcz,项目名称:website,代码行数:43,代码来源:FieldsPlugin.php

示例4: attached

 protected function attached($presenter)
 {
     parent::attached($presenter);
     self::$presenter = $presenter;
     $this->user = $presenter->getUser();
 }
开发者ID:radypala,项目名称:maga-website,代码行数:6,代码来源:BaseControl.php


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