Completed
Push — master ( 5b2a1a...c2fb62 )
by Andrii
02:13
created

AbstractMenu::render()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 1
c 0
b 0
f 0
ccs 0
cts 1
cp 0
nc 1
1
<?php
2
3
namespace hiqdev\thememanager\menus;
4
5
use Yii;
6
7
/**
8
 * Abstract Menu.
9
 *
10
 * @author Andrii Vasyliev <[email protected]>
11
 */
12
abstract class AbstractMenu implements MenuInterface
13
{
14
    /**
15
     * @inheritdoc
16
     */
17
    public static function create($config = [])
18
    {
19
        if (is_array($config) && empty($config['class'])) {
20
            $config['class'] = get_called_class();
21
        }
22
23
        return Yii::createObject($config);
24
    }
25
26
    /**
27
     * @inheritdoc
28
     */
29
    abstract public function render($options = []);
30
}
31