當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Presenter::formatLayoutTemplateFiles方法代碼示例

本文整理匯總了PHP中Nette\Application\UI\Presenter::formatLayoutTemplateFiles方法的典型用法代碼示例。如果您正苦於以下問題:PHP Presenter::formatLayoutTemplateFiles方法的具體用法?PHP Presenter::formatLayoutTemplateFiles怎麽用?PHP Presenter::formatLayoutTemplateFiles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Nette\Application\UI\Presenter的用法示例。


在下文中一共展示了Presenter::formatLayoutTemplateFiles方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: formatLayoutTemplateFiles

 /**
  * @return string[]
  */
 public function formatLayoutTemplateFiles()
 {
     $ret = array();
     if ($this->templateLocator) {
         $ret = $this->templateLocator->formatLayoutTemplateFiles($this);
     } elseif ($this instanceof Presenter) {
         $ret = parent::formatLayoutTemplateFiles();
     }
     foreach ($ret as $key => $val) {
         $ret[$key] = substr($val, 0, -13) . '@email.latte';
     }
     return $ret;
 }
開發者ID:venne,項目名稱:venne,代碼行數:16,代碼來源:EmailPresenter.php

示例2: formatLayoutTemplateFiles

 /**
  * Search default layouts of AjaxPresenter
  * @return array
  */
 public function formatLayoutTemplateFiles()
 {
     $mode = $this->getModal()->isRequested() ? LayoutProvider::MODE_MODAL : LayoutProvider::MODE_DOCUMENT;
     return $this->layoutProvider->prepareLayouts(parent::formatLayoutTemplateFiles(), $this->name, $mode);
 }
開發者ID:pipaslot,項目名稱:modules,代碼行數:9,代碼來源:AjaxPresenter.php

示例3: formatLayoutTemplateFiles

 /**
  * @return mixed
  */
 public function formatLayoutTemplateFiles()
 {
     $layoutFiles = [];
     $name = $this->getName();
     $dir = dirname($_SERVER['SCRIPT_NAME']);
     $presenter = substr($name, strrpos(':' . $name, ':'));
     if (file_exists($_SERVER['DOCUMENT_ROOT'] . $dir . '/themes/' . $this->settings['theme'] . '/' . $presenter . '/@layout.latte')) {
         $layoutFiles[] = $_SERVER['DOCUMENT_ROOT'] . $dir . '/themes/' . $this->settings['theme'] . '/' . $presenter . '/@layout.latte';
     }
     $reflection = $this->getReflection();
     while ($reflection->getName() !== 'Nette\\Application\\UI\\Presenter') {
         if (file_exists($_SERVER['DOCUMENT_ROOT'] . $dir . '/themes/' . $this->settings['theme'] . '/@layout.latte')) {
             $layoutFiles[] = $_SERVER['DOCUMENT_ROOT'] . $dir . '/themes/' . $this->settings['theme'] . '/@layout.latte';
         }
         $reflection = $reflection->getParentClass();
     }
     $originalLayoutFiles = parent::formatLayoutTemplateFiles();
     return array_merge($layoutFiles, $originalLayoutFiles);
 }
開發者ID:svatekr,項目名稱:rsrs,代碼行數:22,代碼來源:BasePresenter.php

示例4: formatLayoutTemplateFiles

 public function formatLayoutTemplateFiles() : Ytnuk\Templating\Template
 {
     $template = $this['templating'][$this->getLayout()];
     return $template instanceof Ytnuk\Templating\Template ? $template->disableRewind() : parent::formatLayoutTemplateFiles();
 }
開發者ID:ytnuk,項目名稱:application,代碼行數:5,代碼來源:Presenter.php

示例5: formatLayoutTemplateFiles

 public function formatLayoutTemplateFiles()
 {
     $list = parent::formatLayoutTemplateFiles();
     $list[] = __DIR__ . '/templates/' . basename($list[0]);
     return $list;
 }
開發者ID:wodcz,項目名稱:sandbox,代碼行數:6,代碼來源:BasePresenter.php

示例6: formatLayoutTemplateFiles

 /**
  * Formats layout template file names
  *
  * @return array
  */
 public function formatLayoutTemplateFiles()
 {
     return array_unique(array_merge($this->getTemplateFilesFormatter()->formatLayoutTemplateFiles($this->getName(), $this->getLayout() ?: 'layout'), parent::formatLayoutTemplateFiles()));
 }
開發者ID:lohini,項目名稱:framework,代碼行數:9,代碼來源:Presenter.php


注:本文中的Nette\Application\UI\Presenter::formatLayoutTemplateFiles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。