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/SegmentEditor/SegmentEditor.php')
-rw-r--r--plugins/SegmentEditor/SegmentEditor.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/SegmentEditor/SegmentEditor.php b/plugins/SegmentEditor/SegmentEditor.php
index f3ea172a54..63cee53c30 100644
--- a/plugins/SegmentEditor/SegmentEditor.php
+++ b/plugins/SegmentEditor/SegmentEditor.php
@@ -9,7 +9,9 @@
namespace Piwik\Plugins\SegmentEditor;
use Piwik\Config;
-use Piwik\Db;
+use Piwik\Container\StaticContainer;
+use Piwik\Piwik;
+use Piwik\Plugins\CoreHome\SystemSummary;
/**
*/
@@ -26,10 +28,19 @@ class SegmentEditor extends \Piwik\Plugin
'AssetManager.getJavaScriptFiles' => 'getJsFiles',
'AssetManager.getStylesheetFiles' => 'getStylesheetFiles',
'Template.nextToCalendar' => 'getSegmentEditorHtml',
+ 'System.addSystemSummaryItems' => 'addSystemSummaryItems',
'Translate.getClientSideTranslationKeys' => 'getClientSideTranslationKeys',
);
}
+ public function addSystemSummaryItems(&$systemSummary)
+ {
+ $storedSegments = StaticContainer::get('Piwik\Plugins\SegmentEditor\Services\StoredSegmentService');
+ $segments = $storedSegments->getAllSegmentsAndIgnoreVisibility();
+ $numSegments = count($segments);
+ $systemSummary[] = new SystemSummary\Item($key = 'segments', Piwik::translate('CoreHome_SystemSummaryNSegments', $numSegments), $value = null, $url = null, $icon = 'icon-segment', $order = 6);
+ }
+
function getSegmentEditorHtml(&$out)
{
$selector = new SegmentSelectorControl();