Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Controller.php « Actions « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 51c7d7ba3a9938bed38a90d3bb0ddd3bb1123e4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?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\Actions;

use Piwik\Plugin\Report;
use Piwik\View;

/**
 * Actions controller
 *
 */
class Controller extends \Piwik\Plugin\Controller
{
    //
    // Actions that render whole pages
    //

    public function indexSiteSearch()
    {
        $view = new View('@Actions/indexSiteSearch');

        $keyword  = Report::factory($this->pluginName, 'getSiteSearchKeywords');
        $noResult = Report::factory($this->pluginName, 'getSiteSearchNoResultKeywords');
        $pageUrls = Report::factory($this->pluginName, 'getPageUrlsFollowingSiteSearch');

        $view->keywords = $keyword->render();
        $view->noResultKeywords = $noResult->render();
        $view->pagesUrlsFollowingSiteSearch = $pageUrls->render();

        $categoryTrackingEnabled = Actions::isCustomVariablesPluginsEnabled();
        if ($categoryTrackingEnabled) {
            $categories = Report::factory($this->pluginName, 'getSiteSearchCategories');
            $view->categories = $categories->render();
        }

        return $view->render();
    }

}