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/Contents/Dimensions.php')
-rw-r--r--plugins/Contents/Dimensions.php33
1 files changed, 33 insertions, 0 deletions
diff --git a/plugins/Contents/Dimensions.php b/plugins/Contents/Dimensions.php
new file mode 100644
index 0000000000..ce74022924
--- /dev/null
+++ b/plugins/Contents/Dimensions.php
@@ -0,0 +1,33 @@
+<?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\Contents;
+
+class Dimensions
+{
+ public static function getRecordNameForAction($apiMethod)
+ {
+ $apiToRecord = array(
+ 'getContentNames' => Archiver::CONTENTS_NAME_PIECE_RECORD_NAME,
+ 'getContentPieces' => Archiver::CONTENTS_PIECE_NAME_RECORD_NAME
+ );
+
+ return $apiToRecord[$apiMethod];
+ }
+
+ public static function getSubtableLabelForApiMethod($apiMethod)
+ {
+ $labelToMethod = array(
+ 'getContentNames' => 'Contents_ContentPiece',
+ 'getContentPieces' => 'Contents_ContentName'
+ );
+
+ return $labelToMethod[$apiMethod];
+ }
+
+}