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: c279ab5fbfbac5bfa5250d3f61f0352d1cd0ac49 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?php
/**
 * Piwik - Open source web analytics
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 *
 * @category Piwik_Plugins
 * @package Actions
 */
namespace Piwik\Plugins\Actions;

use Piwik\Piwik;
use Piwik\View;
use Piwik\ViewDataTable\Factory;

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

    public function indexPageUrls($fetch = false)
    {
        return View::singleReport(
            Piwik::translate('General_Pages'),
            $this->getPageUrls(true), $fetch);
    }

    public function indexEntryPageUrls($fetch = false)
    {
        return View::singleReport(
            Piwik::translate('Actions_SubmenuPagesEntry'),
            $this->getEntryPageUrls(true), $fetch);
    }

    public function indexExitPageUrls($fetch = false)
    {
        return View::singleReport(
            Piwik::translate('Actions_SubmenuPagesExit'),
            $this->getExitPageUrls(true), $fetch);
    }

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

        $view->keywords = $this->getSiteSearchKeywords(true);
        $view->noResultKeywords = $this->getSiteSearchNoResultKeywords(true);
        $view->pagesUrlsFollowingSiteSearch = $this->getPageUrlsFollowingSiteSearch(true);

        $categoryTrackingEnabled = \Piwik\Plugin\Manager::getInstance()->isPluginActivated('CustomVariables');
        if ($categoryTrackingEnabled) {
            $view->categories = $this->getSiteSearchCategories(true);
        }

        echo $view->render();
    }

    public function indexPageTitles($fetch = false)
    {
        return View::singleReport(
            Piwik::translate('Actions_SubmenuPageTitles'),
            $this->getPageTitles(true), $fetch);
    }

    public function indexDownloads($fetch = false)
    {
        return View::singleReport(
            Piwik::translate('General_Downloads'),
            $this->getDownloads(true), $fetch);
    }

    public function indexOutlinks($fetch = false)
    {
        return View::singleReport(
            Piwik::translate('General_Outlinks'),
            $this->getOutlinks(true), $fetch);
    }

    //
    // Actions that render individual reports
    //

    public function getPageUrls($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getEntryPageUrls($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getExitPageUrls($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getSiteSearchKeywords($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getSiteSearchNoResultKeywords($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getSiteSearchCategories($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getPageUrlsFollowingSiteSearch($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getPageTitlesFollowingSiteSearch($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getPageTitles($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getEntryPageTitles($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getExitPageTitles($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getDownloads($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }

    public function getOutlinks($fetch = false)
    {
        return $this->renderReport(__FUNCTION__, $fetch);
    }
}