Completed
Push — master ( 4fbc1b...ef5514 )
by Andrii
03:11
created

OrganizationLink   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 26
ccs 0
cts 8
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 2
1
<?php
2
3
/*
4
 * Theme Manager for Yii2
5
 *
6
 * @link      https://github.com/hiqdev/yii2-thememanager
7
 * @package   yii2-thememanager
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hiqdev\thememanager\widgets;
13
14
use Yii;
15
use yii\base\Widget;
16
use yii\helpers\Html;
17
18
class OrganizationLink extends Widget
19
{
20
    /**
21
     * @var string|array url to organization.
22
     */
23
    public $url;
24
25
    /**
26
     * @var string name to display.
27
     */
28
    public $name;
29
30
    /**
31
     * @var array html options.
32
     */
33
    public $options = [];
34
35
    public function run()
36
    {
37
        return $this->render('OrganizationLink', [
38
            'url'     => $this->url,
39
            'name'    => $this->name ?: 'Organization',
40
            'options' => $this->options,
41
        ]);
42
    }
43
}
44