diff options
Diffstat (limited to 'plugins/Contents/Dimensions.php')
-rw-r--r-- | plugins/Contents/Dimensions.php | 33 |
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]; + } + +} |