本文整理汇总了PHP中eZModule::title方法的典型用法代码示例。如果您正苦于以下问题:PHP eZModule::title方法的具体用法?PHP eZModule::title怎么用?PHP eZModule::title使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZModule
的用法示例。
在下文中一共展示了eZModule::title方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
//.........这里部分代码省略.........
eZDebug::addTimingPoint("Module end '" . $this->module->attribute('name') . "'");
if (!is_array($moduleResult)) {
eZDebug::writeError('Module did not return proper result: ' . $this->module->attribute('name'), 'index.php');
$moduleResult = array();
$moduleResult['content'] = false;
}
if (!isset($moduleResult['ui_context'])) {
$moduleResult['ui_context'] = $this->module->uiContextName();
}
$moduleResult['ui_component'] = $this->module->uiComponentName();
$moduleResult['is_mobile_device'] = $this->mobileDeviceDetect->isMobileDevice();
$moduleResult['mobile_device_alias'] = $this->mobileDeviceDetect->getUserAgentAlias();
$templateResult = null;
eZDebug::setUseExternalCSS($this->siteBasics['external-css']);
if ($this->siteBasics['show-page-layout']) {
$tpl = eZTemplate::factory();
if ($tpl->hasVariable('node')) {
$tpl->unsetVariable('node');
}
if (!isset($moduleResult['path'])) {
$moduleResult['path'] = false;
}
$moduleResult['uri'] = eZSys::requestURI();
$tpl->setVariable("module_result", $moduleResult);
$meta = $ini->variable('SiteSettings', 'MetaDataArray');
if (!isset($meta['description'])) {
$metaDescription = "";
if (isset($moduleResult['path']) && is_array($moduleResult['path'])) {
foreach ($moduleResult['path'] as $pathPart) {
if (isset($pathPart['text'])) {
$metaDescription .= $pathPart['text'] . " ";
}
}
}
$meta['description'] = $metaDescription;
}
$this->site['uri'] = $this->oldURI;
$this->site['redirect'] = false;
$this->site['meta'] = $meta;
$this->site['version'] = eZPublishSDK::version();
$this->site['page_title'] = $this->module->title();
$tpl->setVariable("site", $this->site);
if ($ini->variable('DebugSettings', 'DisplayDebugWarnings') === 'enabled') {
// Make sure any errors or warnings are reported
if (isset($GLOBALS['eZDebugError']) && $GLOBALS['eZDebugError']) {
eZAppendWarningItem(array('error' => array('type' => 'error', 'number' => 1, 'count' => $GLOBALS['eZDebugErrorCount']), 'identifier' => 'ezdebug-first-error', 'text' => ezpI18n::tr('index.php', 'Some errors occurred, see debug for more information.')));
}
if (isset($GLOBALS['eZDebugWarning']) && $GLOBALS['eZDebugWarning']) {
eZAppendWarningItem(array('error' => array('type' => 'warning', 'number' => 1, 'count' => $GLOBALS['eZDebugWarningCount']), 'identifier' => 'ezdebug-first-warning', 'text' => ezpI18n::tr('index.php', 'Some general warnings occured, see debug for more information.')));
}
}
if ($this->siteBasics['user-object-required']) {
$currentUser = eZUser::currentUser();
$tpl->setVariable("current_user", $currentUser);
$tpl->setVariable("anonymous_user_id", $ini->variable('UserSettings', 'AnonymousUserID'));
} else {
$tpl->setVariable("current_user", false);
$tpl->setVariable("anonymous_user_id", false);
}
$tpl->setVariable("access_type", $this->access);
$tpl->setVariable('warning_list', !empty($this->warningList) ? $this->warningList : false);
$resource = "design:";
if (is_string($this->siteBasics['show-page-layout'])) {
if (strpos($this->siteBasics['show-page-layout'], ":") !== false) {
$resource = "";
}
} else {
$this->siteBasics['show-page-layout'] = "pagelayout.tpl";
}
// Set the navigation part
// Check for navigation part settings
$navigationPartString = 'ezcontentnavigationpart';
if (isset($moduleResult['navigation_part'])) {
$navigationPartString = $moduleResult['navigation_part'];
// Fetch the navigation part
}
$navigationPart = eZNavigationPart::fetchPartByIdentifier($navigationPartString);
$tpl->setVariable('navigation_part', $navigationPart);
$tpl->setVariable('uri_string', $this->uri->uriString());
if (isset($moduleResult['requested_uri_string'])) {
$tpl->setVariable('requested_uri_string', $moduleResult['requested_uri_string']);
} else {
$tpl->setVariable('requested_uri_string', $this->actualRequestedURI);
}
// Set UI context and component
$tpl->setVariable('ui_context', $moduleResult['ui_context']);
$tpl->setVariable('ui_component', $moduleResult['ui_component']);
$templateResult = $tpl->fetch($resource . $this->siteBasics['show-page-layout']);
} else {
$templateResult = $moduleResult['content'];
}
eZDebug::addTimingPoint("Script end");
$content = trim(ob_get_clean());
ob_start();
eZDB::checkTransactionCounter();
eZDisplayResult($templateResult);
$content .= ob_get_clean();
$this->shutdown();
return new ezpKernelResult($content);
}
示例2: foreach
if (!isset($meta['description'])) {
$metaDescription = "";
if (isset($moduleResult['path']) and is_array($moduleResult['path'])) {
foreach ($moduleResult['path'] as $pathPart) {
if (isset($pathPart['text'])) {
$metaDescription .= $pathPart['text'] . " ";
}
}
}
$meta['description'] = $metaDescription;
}
$site['uri'] = $oldURI;
$site['redirect'] = false;
$site['meta'] = $meta;
$site['version'] = eZPublishSDK::version();
$site['page_title'] = $module->title();
$tpl->setVariable("site", $site);
if ($ini->variable('DebugSettings', 'DisplayDebugWarnings') == 'enabled') {
// Make sure any errors or warnings are reported
if (isset($GLOBALS['eZDebugError']) and $GLOBALS['eZDebugError']) {
eZAppendWarningItem(array('error' => array('type' => 'error', 'number' => 1, 'count' => $GLOBALS['eZDebugErrorCount']), 'identifier' => 'ezdebug-first-error', 'text' => ezpI18n::tr('index.php', 'Some errors occurred, see debug for more information.')));
}
if (isset($GLOBALS['eZDebugWarning']) and $GLOBALS['eZDebugWarning']) {
eZAppendWarningItem(array('error' => array('type' => 'warning', 'number' => 1, 'count' => $GLOBALS['eZDebugWarningCount']), 'identifier' => 'ezdebug-first-warning', 'text' => ezpI18n::tr('index.php', 'Some general warnings occured, see debug for more information.')));
}
}
if ($userObjectRequired) {
$currentUser = eZUser::currentUser();
$tpl->setVariable("current_user", $currentUser);
$tpl->setVariable("anonymous_user_id", $ini->variable('UserSettings', 'AnonymousUserID'));
} else {