| @@ 123-129 (lines=7) @@ | ||
| 120 | * |
|
| 121 | * @throws \JBZoo\Utils\Exception |
|
| 122 | */ |
|
| 123 | public function beforeRedirect(Event $event, $url, Response $response) |
|
| 124 | { |
|
| 125 | $pluginEvent = Plugin::getData('Core', 'Controller.beforeRedirect'); |
|
| 126 | if (is_callable($pluginEvent->find(0)) && Plugin::hasManifestEvent('Controller.beforeRedirect')) { |
|
| 127 | call_user_func_array($pluginEvent->find(0), [$this, $event, $url, $response]); |
|
| 128 | } |
|
| 129 | } |
|
| 130 | ||
| 131 | /** |
|
| 132 | * Called after the controller action is run and rendered. |
|
| @@ 83-91 (lines=9) @@ | ||
| 80 | * |
|
| 81 | * @throws \JBZoo\Utils\Exception |
|
| 82 | */ |
|
| 83 | public function afterRender(Event $event, $viewFile) |
|
| 84 | { |
|
| 85 | $this->_setupMetaData(); |
|
| 86 | ||
| 87 | $pluginEvent = Plugin::getData('Core', 'View.afterRender'); |
|
| 88 | if (is_callable($pluginEvent->find(0)) && Plugin::hasManifestEvent('View.afterRender')) { |
|
| 89 | call_user_func_array($pluginEvent->find(0), [$this->_View, $event, $viewFile]); |
|
| 90 | } |
|
| 91 | } |
|
| 92 | ||
| 93 | /** |
|
| 94 | * Is called after each view file is rendered. This includes elements, views, parent views and layouts. |
|
| @@ 104-110 (lines=7) @@ | ||
| 101 | * |
|
| 102 | * @throws \JBZoo\Utils\Exception |
|
| 103 | */ |
|
| 104 | public function afterRenderFile(Event $event, $viewFile, $content) |
|
| 105 | { |
|
| 106 | $pluginEvent = Plugin::getData('Core', 'View.afterRenderFile'); |
|
| 107 | if (is_callable($pluginEvent->find(0)) && Plugin::hasManifestEvent('View.afterRenderFile')) { |
|
| 108 | call_user_func_array($pluginEvent->find(0), [$this->_View, $event, $viewFile, $content]); |
|
| 109 | } |
|
| 110 | } |
|
| 111 | ||
| 112 | /** |
|
| 113 | * Get assets fot layout render. |
|
| @@ 157-165 (lines=9) @@ | ||
| 154 | * @throws \JBZoo\Less\Exception |
|
| 155 | * @throws \JBZoo\Utils\Exception |
|
| 156 | */ |
|
| 157 | public function beforeRender(Event $event, $viewFile) |
|
| 158 | { |
|
| 159 | $this->Assets->loadPluginAssets(); |
|
| 160 | ||
| 161 | $pluginEvent = Plugin::getData('Core', 'View.beforeRender'); |
|
| 162 | if (is_callable($pluginEvent->find(0)) && Plugin::hasManifestEvent('View.beforeRender')) { |
|
| 163 | call_user_func_array($pluginEvent->find(0), [$this->_View, $event, $viewFile]); |
|
| 164 | } |
|
| 165 | } |
|
| 166 | ||
| 167 | /** |
|
| 168 | * Is called before each view file is rendered. This includes elements, views, parent views and layouts. |
|