diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-13 13:16:06 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-08-13 13:16:06 +0400 |
commit | 1d2524063fd84ca90d9dbbf09962e9e780c4dc0d (patch) | |
tree | 556c406d85ff8b86a5622204c117a19adff1b4b0 /core | |
parent | 25d388ca505764de547205aa1b0db0a65f056798 (diff) |
removing this method again for now since the live controller already implements such a method and therefore docs generation fails. Also other plugin developers might have already implemented such a method maybe
Diffstat (limited to 'core')
-rw-r--r-- | core/Plugin/Controller.php | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/core/Plugin/Controller.php b/core/Plugin/Controller.php index bd3ef0d3bf..5521eaf0c2 100644 --- a/core/Plugin/Controller.php +++ b/core/Plugin/Controller.php @@ -249,45 +249,6 @@ abstract class Controller } /** - * Assigns the given variables to the template and renders it. - * - * Example: - * ``` - public function myControllerAction () { - return $this->render('index', array( - 'answerToLife' => '42' - )); - } - ``` - * This will render the 'index.twig' file within the plugin templates folder and assign the view variable - * `answerToLife` to `42`. - * - * @param string $template The name of the template file. If only a name is given it will automatically use - * the template within the plugin folder. For instance 'myTemplate' will result in - * '@$pluginName/myTemplate.twig'. Alternatively you can include the full path: - * '@anyOtherFolder/otherTemplate'. The trailing '.twig' is not needed. - * @param array $variables For instance array('myViewVar' => 'myValue'). In template you can use {{ myViewVar }} - * @return string - * @since 2.5.0 - * @api - */ - protected function render($template, array $variables = array()) - { - if (false === strpos($template, '@') || false === strpos($template, '/')) { - $template = '@' . $this->pluginName . '/' . $template; - } - - $view = new View($template); - $this->setBasicVariablesView($view); - - foreach ($variables as $key => $value) { - $view->$key = $value; - } - - return $view->render(); - } - - /** * Convenience method that creates and renders a ViewDataTable for a API method. * * @param string|\Piwik\Plugin\Report $apiAction The name of the API action (eg, `'getResolution'`) or |