DashboardPresenter::editLink()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 19
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 19
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 11
nc 1
nop 0
1
<?php namespace Anomaly\DashboardModule\Dashboard;
2
3
use Anomaly\Streams\Platform\Entry\EntryPresenter;
4
5
/**
6
 * Class DashboardPresenter
7
 *
8
 * @link          http://pyrocms.com/
9
 * @author        PyroCMS, Inc. <[email protected]>
10
 * @author        Ryan Thompson <[email protected]>
11
 */
12
class DashboardPresenter extends EntryPresenter
13
{
14
15
    /**
16
     * Return the edit link.
17
     *
18
     * @return string
19
     */
20
    public function editLink()
21
    {
22
        return app('html')->link(
23
            implode(
24
                '/',
25
                array_unique(
26
                    array_filter(
27
                        [
28
                            'admin',
29
                            $this->object->getStreamNamespace(),
30
                            'edit',
31
                            $this->object->getId(),
32
                        ]
33
                    )
34
                )
35
            ),
36
            $this->object->{$this->object->getTitleName()}
37
        );
38
    }
39
}
40