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:
authorThomas Steur <thomas.steur@gmail.com>2015-06-02 04:09:15 +0300
committerThomas Steur <thomas.steur@gmail.com>2015-06-17 08:09:13 +0300
commit18501381cec766aa729fdc7bdcd282c90a7be45f (patch)
treecf7cfe213d72cbd57ec86e570a5e2a7c4dc55815 /plugins/API
parent1f707dd3c9422494b7cf844591079c11c651158c (diff)
refs #7893 added possibility to measure mobile apps
Diffstat (limited to 'plugins/API')
-rw-r--r--plugins/API/API.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/API/API.php b/plugins/API/API.php
index 34f0ad5bb5..d66a0b35a2 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -27,6 +27,7 @@ use Piwik\Plugins\API\DataTable\MergeDataTables;
use Piwik\Plugins\CoreAdminHome\CustomLogo;
use Piwik\Segment\SegmentExpression;
use Piwik\Translation\Translator;
+use Piwik\Measurable\Type;
use Piwik\Version;
require_once PIWIK_INCLUDE_PATH . '/core/Config.php';
@@ -94,6 +95,24 @@ class API extends \Piwik\Plugin\API
return Metrics::getDefaultMetricTranslations();
}
+ public function getAvailableTypes()
+ {
+ $typeManager = new Type\Manager();
+ $types = $typeManager->getAllTypes();
+
+ $available = array();
+ foreach ($types as $type) {
+ $available[] = array(
+ 'id' => $type->getId(),
+ 'name' => Piwik::translate($type->getName()),
+ 'description' => Piwik::translate($type->getDescription()),
+ 'howToSetupUrl' => $type->getHowToSetupUrl()
+ );
+ }
+
+ return $available;
+ }
+
public function getSegmentsMetadata($idSites = array(), $_hideImplementationData = true)
{
$segments = array();