General['API_datatable_default_limit']; $token .= '&api_datatable_default_limit=' . $_GET['filter_limit']; } $request = new Request($token); $response = $request->process(); if (is_array($response)) { $response = var_export($response, true); } return $response; } public function listAllMethods() { $ApiDocumentation = new DocumentationGenerator(); return $ApiDocumentation->getAllInterfaceString($outputExampleUrls = true, $prefixUrls = Common::getRequestVar('prefixUrl', '')); } public function listAllAPI() { $view = new View("@API/listAllAPI"); $this->setGeneralVariablesView($view); $ApiDocumentation = new DocumentationGenerator(); $view->countLoadedAPI = Proxy::getInstance()->getCountRegisteredClasses(); $view->list_api_methods_with_links = $ApiDocumentation->getAllInterfaceString(); return $view->render(); } public function listSegments() { $segments = API::getInstance()->getSegmentsMetadata($this->idSite); $tableDimensions = $tableMetrics = ''; $customVariables = 0; $lastCategory = array(); foreach ($segments as $segment) { // Eg. Event Value is a metric, not in the Visit metric category, // we make sure it is displayed along with the Events dimensions if ($segment['type'] == 'metric' && $segment['category'] != Piwik::translate('General_Visit')) { $segment['type'] = 'dimension'; } $onlyDisplay = array('customVariableName1', 'customVariableName2', 'customVariableValue1', 'customVariableValue2', 'customVariablePageName1', 'customVariablePageValue1'); $customVariableWillBeDisplayed = in_array($segment['segment'], $onlyDisplay); // Don't display more than 4 custom variables name/value rows if ($segment['category'] == 'Custom Variables' && !$customVariableWillBeDisplayed ) { continue; } $thisCategory = $segment['category']; $output = ''; if (empty($lastCategory[$segment['type']]) || $lastCategory[$segment['type']] != $thisCategory ) { $output .= '
' . $segment['acceptedValues'] . '
'
: '';
$restrictedToAdmin = isset($segment['permission']) ? 'customVariableName1==Type;customVariableValue1==Customer
customVariablePageName1==ArticleLanguage;customVariablePageValue1==FR