1 | <?php |
||
8 | abstract class Plugin { |
||
9 | |||
10 | /** |
||
11 | * Autoload path for plugin. |
||
12 | * |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $path; |
||
16 | |||
17 | /** |
||
18 | * Create a new plugin instance. |
||
19 | 134 | * |
|
20 | */ |
||
21 | 134 | public function __construct($config = null) |
|
34 | |||
35 | /** |
||
36 | * Set the plugin autoload path. |
||
37 | * |
||
38 | * @return void |
||
39 | */ |
||
40 | public function setPath() |
||
44 | |||
45 | /** |
||
46 | * Get autoload path. |
||
47 | * |
||
48 | * @return string |
||
49 | */ |
||
50 | public function path($append = null) |
||
55 | |||
56 | /** |
||
57 | * Get paths to templates. |
||
58 | * |
||
59 | * @return string |
||
60 | */ |
||
61 | public function templatePaths() |
||
66 | |||
67 | /** |
||
68 | * Trigger an event callback. |
||
69 | * - onLoad |
||
70 | * - onDefine |
||
71 | * - onRender |
||
72 | * - onSubmitted |
||
73 | * - onCompleted |
||
74 | 134 | * - onValidate |
|
75 | * - onValidated |
||
76 | 134 | * - onValid |
|
77 | * - onInvalid |
||
78 | 134 | * |
|
79 | 134 | * @param \Helmut\Forms\Form $form |
|
80 | * @param string $name |
||
81 | * @param array $params |
||
82 | 134 | * @return mixed |
|
83 | */ |
||
84 | public function event($form, $name, $params = []) |
||
93 | |||
94 | } |
||
95 |