| 1 | <?php |
||
| 20 | abstract class AbstractMenu implements MenuInterface |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * {@inheritdoc} |
||
| 24 | */ |
||
| 25 | public static function widget($menuConfig = [], $widgetConfig = []) |
||
| 26 | { |
||
| 27 | return static::create($menuConfig)->run($widgetConfig); |
||
| 28 | } |
||
| 29 | |||
| 30 | /** |
||
| 31 | * {@inheritdoc} |
||
| 32 | */ |
||
| 33 | public static function create($config = []) |
||
| 34 | { |
||
| 35 | $config['class'] = get_called_class(); |
||
| 36 | |||
| 37 | return Yii::createObject($config); |
||
| 38 | } |
||
| 39 | |||
| 40 | /** |
||
| 41 | * {@inheritdoc} |
||
| 42 | */ |
||
| 43 | abstract public function run($config = []); |
||
| 44 | } |
||
| 45 |