Conditions | 2 |
Paths | 1 |
Total Lines | 29 |
Code Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
64 | public function init() |
||
65 | { |
||
66 | parent::init(); |
||
67 | self::$plugin = $this; |
||
68 | |||
69 | Event::on( |
||
70 | Fields::class, |
||
71 | Fields::EVENT_REGISTER_FIELD_TYPES, |
||
72 | static function(RegisterComponentTypesEvent $event) { |
||
73 | $event->types[] = Code::class; |
||
74 | } |
||
75 | ); |
||
76 | |||
77 | Event::on( |
||
78 | Plugins::class, |
||
79 | Plugins::EVENT_AFTER_INSTALL_PLUGIN, |
||
80 | function(PluginEvent $event) { |
||
81 | if ($event->plugin === $this) { |
||
82 | } |
||
83 | } |
||
84 | ); |
||
85 | |||
86 | Craft::info( |
||
87 | Craft::t( |
||
88 | 'codefield', |
||
89 | '{name} plugin loaded', |
||
90 | ['name' => $this->name] |
||
91 | ), |
||
92 | __METHOD__ |
||
93 | ); |
||
96 |