本文整理汇总了PHP中Piwik_GetAdminMenu函数的典型用法代码示例。如果您正苦于以下问题:PHP Piwik_GetAdminMenu函数的具体用法?PHP Piwik_GetAdminMenu怎么用?PHP Piwik_GetAdminMenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Piwik_GetAdminMenu函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generalSettings
public function generalSettings()
{
Piwik::checkUserHasSomeAdminAccess();
$view = Piwik_View::factory('generalSettings');
if (Piwik::isUserIsSuperUser()) {
$enableBrowserTriggerArchiving = Piwik_ArchiveProcessing::isBrowserTriggerArchivingEnabled();
$todayArchiveTimeToLive = Piwik_ArchiveProcessing::getTodayArchiveTimeToLive();
$showWarningCron = false;
if (!$enableBrowserTriggerArchiving && $todayArchiveTimeToLive < 3600) {
$showWarningCron = true;
}
$view->showWarningCron = $showWarningCron;
$view->todayArchiveTimeToLive = $todayArchiveTimeToLive;
$view->enableBrowserTriggerArchiving = $enableBrowserTriggerArchiving;
if (!Piwik_Config::getInstance()->isFileWritable()) {
$view->configFileNotWritable = true;
}
$view->mail = Piwik_Config::getInstance()->mail;
$view->branding = Piwik_Config::getInstance()->branding;
$directoryWritable = is_writable(PIWIK_DOCUMENT_ROOT . '/themes/');
$logoFilesWriteable = is_writeable(PIWIK_DOCUMENT_ROOT . '/themes/logo.png') && is_writeable(PIWIK_DOCUMENT_ROOT . '/themes/logo-header.png');
$view->logosWriteable = ($logoFilesWriteable || $directoryWritable) && ini_get('file_uploads') == 1;
}
$view->language = Piwik_LanguagesManager::getLanguageCodeForCurrentUser();
$this->setBasicVariablesView($view);
$view->topMenu = Piwik_GetTopMenu();
$view->menu = Piwik_GetAdminMenu();
echo $view->render();
}
示例2: index
function index()
{
Piwik::checkUserIsSuperUser();
$plugins = array();
$listPlugins = Piwik_PluginsManager::getInstance()->readPluginsDirectory();
foreach($listPlugins as $pluginName)
{
$oPlugin = Piwik_PluginsManager::getInstance()->loadPlugin($pluginName);
$plugins[$pluginName] = array(
'activated' => Piwik_PluginsManager::getInstance()->isPluginActivated($pluginName),
'alwaysActivated' => Piwik_PluginsManager::getInstance()->isPluginAlwaysActivated($pluginName),
);
}
Piwik_PluginsManager::getInstance()->loadPluginTranslations();
$loadedPlugins = Piwik_PluginsManager::getInstance()->getLoadedPlugins();
foreach($loadedPlugins as $oPlugin)
{
$pluginName = $oPlugin->getPluginName();
$plugins[$pluginName]['info'] = $oPlugin->getInformation();
}
$view = Piwik_View::factory('manage');
$view->pluginsName = $plugins;
$this->setBasicVariablesView($view);
$view->menu = Piwik_GetAdminMenu();
if(!Zend_Registry::get('config')->isFileWritable())
{
$view->configFileNotWritable = true;
}
echo $view->render();
}
示例3: index
function index()
{
$view = new Piwik_View('DBStats/templates/DBStats.tpl');
$view->tablesStatus = Piwik_DBStats_API::getAllTablesStatus();
$view->menu = Piwik_GetAdminMenu();
echo $view->render();
}
示例4: index
function index()
{
Piwik::checkUserIsSuperUser();
$plugins = array();
$listPlugins = array_merge(Piwik_PluginsManager::getInstance()->readPluginsDirectory(), Piwik_Config::getInstance()->Plugins['Plugins']);
$listPlugins = array_unique($listPlugins);
foreach ($listPlugins as $pluginName) {
$oPlugin = Piwik_PluginsManager::getInstance()->loadPlugin($pluginName);
$plugins[$pluginName] = array('activated' => Piwik_PluginsManager::getInstance()->isPluginActivated($pluginName), 'alwaysActivated' => Piwik_PluginsManager::getInstance()->isPluginAlwaysActivated($pluginName));
}
Piwik_PluginsManager::getInstance()->loadPluginTranslations();
$loadedPlugins = Piwik_PluginsManager::getInstance()->getLoadedPlugins();
foreach ($loadedPlugins as $oPlugin) {
$pluginName = $oPlugin->getPluginName();
$plugins[$pluginName]['info'] = $oPlugin->getInformation();
}
foreach ($plugins as $pluginName => &$plugin) {
if (!isset($plugin['info'])) {
$plugin['info'] = array('description' => '<strong><em>' . Piwik_Translate('CorePluginsAdmin_PluginCannotBeFound') . '</strong></em>', 'version' => Piwik_Translate('General_Unknown'));
}
}
$view = Piwik_View::factory('manage');
$view->pluginsName = $plugins;
$this->setBasicVariablesView($view);
$view->menu = Piwik_GetAdminMenu();
if (!Piwik_Config::getInstance()->isFileWritable()) {
$view->configFileNotWritable = true;
}
echo $view->render();
}
示例5: index
function index()
{
Piwik::checkUserIsNotAnonymous();
$view = Piwik_View::factory('Settings');
$view->isSuperUser = Piwik::isUserIsSuperUser();
$mobileMessagingAPI = Piwik_MobileMessaging_API::getInstance();
$view->delegatedManagement = $mobileMessagingAPI->getDelegatedManagement();
$view->credentialSupplied = $mobileMessagingAPI->areSMSAPICredentialProvided();
$view->accountManagedByCurrentUser = $view->isSuperUser || $view->delegatedManagement;
$view->strHelpAddPhone = Piwik_Translate('MobileMessaging_Settings_PhoneNumbers_HelpAdd', array(Piwik_Translate('UserSettings_SubmenuSettings'), Piwik_Translate('MobileMessaging_SettingsMenu')));
if ($view->credentialSupplied && $view->accountManagedByCurrentUser) {
$view->provider = $mobileMessagingAPI->getSMSProvider();
$view->creditLeft = $mobileMessagingAPI->getCreditLeft();
}
$view->smsProviders = Piwik_MobileMessaging_SMSProvider::$availableSMSProviders;
// construct the list of countries from the lang files
$countries = array();
foreach (Piwik_Common::getCountriesList() as $countryCode => $continentCode) {
if (isset(Piwik_MobileMessaging_CountryCallingCodes::$countryCallingCodes[$countryCode])) {
$countries[$countryCode] = array('countryName' => Piwik_CountryTranslate($countryCode), 'countryCallingCode' => Piwik_MobileMessaging_CountryCallingCodes::$countryCallingCodes[$countryCode]);
}
}
$view->countries = $countries;
$view->defaultCountry = Piwik_Common::getCountry(Piwik_LanguagesManager::getLanguageCodeForCurrentUser(), true, Piwik_IP::getIpFromHeader());
$view->phoneNumbers = $mobileMessagingAPI->getPhoneNumbers();
$this->setBasicVariablesView($view);
$view->menu = Piwik_GetAdminMenu();
echo $view->render();
}
示例6: getDefaultIndexView
protected function getDefaultIndexView()
{
$view = new Piwik_View('CoreAdminHome/templates/index.tpl');
$view->content = '';
$view->menu = Piwik_GetAdminMenu();
return $view;
}
示例7: generalSettings
public function generalSettings()
{
Piwik::checkUserHasSomeAdminAccess();
$view = Piwik_View::factory('generalSettings');
if (Piwik::isUserIsSuperUser()) {
$enableBrowserTriggerArchiving = Piwik_ArchiveProcessing::isBrowserTriggerArchivingEnabled();
$todayArchiveTimeToLive = Piwik_ArchiveProcessing::getTodayArchiveTimeToLive();
$showWarningCron = false;
if (!$enableBrowserTriggerArchiving && $todayArchiveTimeToLive < 3600) {
$showWarningCron = true;
}
$view->showWarningCron = $showWarningCron;
$view->todayArchiveTimeToLive = $todayArchiveTimeToLive;
$view->enableBrowserTriggerArchiving = $enableBrowserTriggerArchiving;
$view->language = Piwik_LanguagesManager::getLanguageCodeForCurrentUser();
if (!Zend_Registry::get('config')->isFileWritable()) {
$view->configFileNotWritable = true;
}
$view->mail = Zend_Registry::get('config')->mail->toArray();
}
$this->setBasicVariablesView($view);
$view->topMenu = Piwik_GetTopMenu();
$view->menu = Piwik_GetAdminMenu();
echo $view->render();
}
示例8: getDefaultIndexView
protected function getDefaultIndexView()
{
$view = Piwik_View::factory('index');
$view->content = '';
$this->setGeneralVariablesView($view);
$view->menu = Piwik_GetAdminMenu();
return $view;
}
示例9: index
function index()
{
$view = Piwik_View::factory('DBStats');
$view->tablesStatus = Piwik_DBStats_API::getAllTablesStatus();
$this->setGeneralVariablesView($view);
$view->menu = Piwik_GetAdminMenu();
echo $view->render();
}
示例10: displayJavascriptCode
function displayJavascriptCode()
{
$idSite = Piwik_Common::getRequestVar('idsite', 1);
Piwik::checkUserHasViewAccess($idSite);
$jsTag = Piwik::getJavascriptCode($idSite, Piwik_Url::getCurrentUrlWithoutFileName());
$view = new Piwik_View('SitesManager/templates/DisplayJavascriptCode.tpl');
$view->menu = Piwik_GetAdminMenu();
$view->jsTag = $jsTag;
echo $view->render();
}
示例11: displayJavascriptCode
function displayJavascriptCode()
{
$idSite = Piwik_Common::getRequestVar('idsite', 1);
Piwik::checkUserHasViewAccess($idSite);
$jsTag = Piwik::getJavascriptCode($idSite, Piwik_Url::getCurrentUrlWithoutFileName());
$view = Piwik_View::factory('DisplayJavascriptCode');
$this->setGeneralVariablesView($view);
$view->menu = Piwik_GetAdminMenu();
$view->jsTag = $jsTag;
echo $view->render();
}
示例12: Piwik_GetCurrentAdminMenuName
/**
* Returns the current AdminMenu name
* @return boolean
*/
function Piwik_GetCurrentAdminMenuName()
{
$menu = Piwik_GetAdminMenu();
$currentModule = Piwik::getModule();
$currentAction = Piwik::getAction();
foreach ($menu as $name => $parameters) {
if ($parameters['_url']['module'] == $currentModule && $parameters['_url']['action'] == $currentAction) {
return $name;
}
}
return false;
}
示例13: getDefaultIndexView
protected function getDefaultIndexView()
{
$view = new Piwik_View('AdminHome/templates/index.tpl');
$view->menu = Piwik_GetAdminMenu();
$view->menuJson = json_encode($view->menu);
$view->userLogin = Piwik::getCurrentUserLogin();
$view->sites = Piwik_SitesManager_API::getSitesWithAtLeastViewAccess();
$view->url = Piwik_Url::getCurrentUrl();
$view->basicHtmlView = false;
$view->content = '';
return $view;
}
示例14: adminMenu
public function adminMenu()
{
Piwik::checkUserIsSuperUser();
$view = Piwik_View::factory('settings');
if (!Piwik_MobileAnalytics::settingsExist()) {
Piwik_MobileAnalytics::createSettings();
}
$view->config = Piwik_Config::getInstance()->MobileAnalytics;
$this->setBasicVariablesView($view);
$view->topMenu = Piwik_GetTopMenu();
$view->menu = Piwik_GetAdminMenu();
echo $view->render();
}
示例15: displayJavascriptCode
/**
* Displays the admin UI page showing all tracking tags
* @return unknown_type
*/
function displayJavascriptCode()
{
$idSite = Piwik_Common::getRequestVar('idSite');
Piwik::checkUserHasViewAccess($idSite);
$jsTag = Piwik::getJavascriptCode($idSite, Piwik_Url::getCurrentUrlWithoutFileName());
$view = Piwik_View::factory('Tracking');
$this->setBasicVariablesView($view);
$view->menu = Piwik_GetAdminMenu();
$view->idSite = $idSite;
$site = new Piwik_Site($idSite);
$view->displaySiteName = $site->getName();
$view->jsTag = $jsTag;
echo $view->render();
}