本文整理汇总了PHP中Piwik\Piwik::getRandomTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Piwik::getRandomTitle方法的具体用法?PHP Piwik::getRandomTitle怎么用?PHP Piwik::getRandomTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Piwik\Piwik
的用法示例。
在下文中一共展示了Piwik::getRandomTitle方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configureView
/**
* This is just a copy-paste of the parent's member.
* It's sole reason for existence here is the fact that the parent has it
* defined as "private". See https://github.com/piwik/piwik/pull/8681 for
* information.
*
* @param View $view
*/
protected function configureView($view)
{
$this->setBasicVariablesView($view);
$view->linkTitle = Piwik::getRandomTitle();
// crsf token: don't trust the submitted value; generate/fetch it from session data
$view->nonce = Nonce::getNonce('Login.login');
}
示例2: handleMaintenanceMode
protected function handleMaintenanceMode()
{
if (Config::getInstance()->General['maintenance_mode'] != 1 || Common::isPhpCliMode()) {
return;
}
Common::sendResponseCode(503);
$logoUrl = null;
$faviconUrl = null;
try {
$logo = new CustomLogo();
$logoUrl = $logo->getHeaderLogoUrl();
$faviconUrl = $logo->getPathUserFavicon();
} catch (Exception $ex) {
}
$logoUrl = $logoUrl ?: 'plugins/Morpheus/images/logo-header.png';
$faviconUrl = $faviconUrl ?: 'plugins/CoreHome/images/favicon.ico';
$page = file_get_contents(PIWIK_INCLUDE_PATH . '/plugins/Morpheus/templates/maintenance.tpl');
$page = str_replace('%logoUrl%', $logoUrl, $page);
$page = str_replace('%faviconUrl%', $faviconUrl, $page);
$page = str_replace('%piwikTitle%', Piwik::getRandomTitle(), $page);
echo $page;
exit;
}
示例3: configureView
/**
* Configure common view properties
*
* @param View $view
*/
private function configureView($view)
{
$this->setBasicVariablesView($view);
$view->linkTitle = Piwik::getRandomTitle();
$view->forceSslLogin = Config::getInstance()->General['force_ssl_login'];
// crsf token: don't trust the submitted value; generate/fetch it from session data
$view->nonce = Nonce::getNonce('Login.login');
}