Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/LeftMenu/API.php')
-rw-r--r--plugins/LeftMenu/API.php44
1 files changed, 0 insertions, 44 deletions
diff --git a/plugins/LeftMenu/API.php b/plugins/LeftMenu/API.php
deleted file mode 100644
index 3d0d38b646..0000000000
--- a/plugins/LeftMenu/API.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * Piwik - free/libre analytics platform
- *
- * @link http://piwik.org
- * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
- *
- */
-namespace Piwik\Plugins\LeftMenu;
-
-/**
- * API for plugin LeftMenu
- *
- * @method static \Piwik\Plugins\LeftMenu\API getInstance()
- */
-class API extends \Piwik\Plugin\API
-{
- /**
- * Returns true if the left menu is enabled for the current user.
- *
- * @return bool
- */
- public function isEnabled()
- {
- $settings = new Settings('LeftMenu');
- $default = $settings->globalEnabled->getValue();
-
- if (!$settings->userEnabled->isReadableByCurrentUser()) {
- return $default;
- }
-
- $user = $settings->userEnabled->getValue();
-
- if (empty($user) || $user === 'system') {
- return $default;
- }
-
- if ($user === 'no') {
- return false;
- }
-
- return true;
- }
-}