Conditions | 1 |
Paths | 1 |
Total Lines | 25 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
54 | public function init() |
||
55 | { |
||
56 | parent::init(); |
||
57 | self::$plugin = $this; |
||
58 | |||
59 | $this->setComponents([ |
||
60 | 'api' => LeverService::class, |
||
61 | ]); |
||
62 | |||
63 | Event::on( |
||
64 | CraftVariable::class, |
||
65 | CraftVariable::EVENT_INIT, |
||
66 | function (Event $event) { |
||
67 | $variable = $event->sender; |
||
68 | $variable->set('lever', LeverVariable::class); |
||
69 | } |
||
70 | ); |
||
71 | |||
72 | Craft::info( |
||
73 | Craft::t( |
||
74 | 'lever', |
||
75 | '{name} plugin loaded', |
||
76 | ['name' => $this->name] |
||
77 | ), |
||
78 | __METHOD__ |
||
79 | ); |
||
109 |