Completed
Push — master ( 8849ee...a1b70f )
by Andreas
24:35
created

org_openpsa_projects_navigation   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 17
c 0
b 0
f 0
dl 0
loc 27
ccs 16
cts 16
cp 1
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A get_leaves() 0 22 1
1
<?php
2
/**
3
 * @package org.openpsa.projects
4
 * @author Nemein Oy, http://www.nemein.com/
5
 * @copyright Nemein Oy, http://www.nemein.com/
6
 * @license http://www.gnu.org/licenses/gpl.html GNU General Public License
7
 */
8
9
/**
10
 * org.openpsa.projects NAP interface class.
11
 *
12
 * @package org.openpsa.projects
13
 */
14
class org_openpsa_projects_navigation extends midcom_baseclasses_components_navigation
15
{
16
    /**
17
     * Returns a static leaf list with access to different task lists.
18
     */
19 1
    public function get_leaves()
20
    {
21
        return [
22 1
            "{$this->_topic->id}:tasks_current" => [
23 1
                MIDCOM_NAV_URL => "task/list/current/",
24 1
                MIDCOM_NAV_NAME => $this->_l10n->get('current tasks'),
25
            ],
26 1
            "{$this->_topic->id}:tasks_open" => [
27 1
                MIDCOM_NAV_URL => "task/list/open/",
28 1
                MIDCOM_NAV_NAME => $this->_l10n->get('open tasks'),
29
            ],
30 1
            "{$this->_topic->id}:tasks_closed" => [
31 1
                MIDCOM_NAV_URL => "task/list/closed/",
32 1
                MIDCOM_NAV_NAME => $this->_l10n->get('closed tasks'),
33
            ],
34 1
            "{$this->_topic->id}:tasks_invoiceable" => [
35 1
                MIDCOM_NAV_URL => "task/list/invoiceable/",
36 1
                MIDCOM_NAV_NAME => $this->_l10n->get('invoiceable tasks'),
37
            ],
38 1
            "{$this->_topic->id}:tasks_invoiced" => [
39 1
                MIDCOM_NAV_URL => "task/list/invoiced/",
40 1
                MIDCOM_NAV_NAME => $this->_l10n->get('invoiced tasks'),
41
            ]
42
        ];
43
    }
44
}
45