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

GetPagesEntry.php « Reports « Goals « plugins - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5ed0b766bada4f24f18d07072c7d2bb9495ef70d (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
<?php
/**
 * Matomo - free/libre analytics platform
 *
 * @link https://matomo.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 *
 */
namespace Piwik\Plugins\Goals\Reports;

use Piwik\Piwik;
use Piwik\Plugin\ViewDataTable;
use Piwik\Plugins\Actions\Columns\EntryPageUrl;
use Piwik\Plugins\Goals\Visualizations\GoalsEntryPages;
use Piwik\Plugin\ReportsProvider;
use Piwik\Plugins\CoreVisualizations\Visualizations\HtmlTable;

class GetPagesEntry extends BasePages
{

    protected function init()
    {
        parent::init();
        $this->name = Piwik::translate('Goals_EntryPages');
        $this->documentation = Piwik::translate('Goals_EntryPagesReportDocumentation');
        $this->dimension = new EntryPageUrl();
        $this->metrics = array( 'nb_conversions_entry', 'nb_visits_converted', 'revenue_entry', 'entry_nb_visits');
        $this->order = 2;
    }

    public function configureView(ViewDataTable $view)
    {

        $view->config->show_exclude_low_population = false;

        if ($view->isViewDataTableId(HtmlTable::ID)) {
            $view->config->disable_subtable_when_show_goals = true;
        }

        $view->requestConfig->filter_sort_column = 'entry_nb_visits';
        $view->requestConfig->filter_sort_order  = 'asc';
        $view->requestConfig->filter_limit       = 25;

        $view->config->addTranslations(array('label' => $this->dimension->getName(),
                                             'entry_nb_visits' => Piwik::translate('General_ColumnEntrances')));

    }

    public function getDefaultTypeViewDataTable()
    {
        return GoalsEntryPages::ID;
    }

    public function getRelatedReports()
    {
        return array(
            ReportsProvider::factory('Goals', 'getPagesEntryTitles'),
        );
    }

}