本文整理汇总了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;
}
示例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);
}
示例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);
}
示例4: formatLayoutTemplateFiles
public function formatLayoutTemplateFiles() : Ytnuk\Templating\Template
{
$template = $this['templating'][$this->getLayout()];
return $template instanceof Ytnuk\Templating\Template ? $template->disableRewind() : parent::formatLayoutTemplateFiles();
}
示例5: formatLayoutTemplateFiles
public function formatLayoutTemplateFiles()
{
$list = parent::formatLayoutTemplateFiles();
$list[] = __DIR__ . '/templates/' . basename($list[0]);
return $list;
}
示例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()));
}