diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2019-05-17 13:52:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-17 13:52:38 +0300 |
commit | 7215ff1419f6d8b4a97b8883c51974577a45af0d (patch) | |
tree | 2eec11f2b121e4b41903968d98e27b9ca3c80e40 /core/Plugin/ControllerAdmin.php | |
parent | f8792441937fab9da4862a7387fc5aa13e04cd1d (diff) |
Let controllers specify what type a view to be rendered is (#14309)
* Let controllers specify what type a view to be rendered is, so it is not always assumed based on controller type.
* Check the view type.
* Do not modify @api methods.
* tweak comment
Diffstat (limited to 'core/Plugin/ControllerAdmin.php')
-rw-r--r-- | core/Plugin/ControllerAdmin.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/Plugin/ControllerAdmin.php b/core/Plugin/ControllerAdmin.php index e9040427cf..b925d3758e 100644 --- a/core/Plugin/ControllerAdmin.php +++ b/core/Plugin/ControllerAdmin.php @@ -123,13 +123,15 @@ abstract class ControllerAdmin extends Controller * using the supplied view. * * @param View $view - * @api + * @param string $viewType If 'admin', the admin variables are set as well as basic ones. */ - protected function setBasicVariablesView($view) + protected function setBasicVariablesViewAs($view, $viewType = 'admin') { $this->setBasicVariablesNoneAdminView($view); - self::setBasicVariablesAdminView($view); + if ($viewType == 'admin') { + self::setBasicVariablesAdminView($view); + } } private static function notifyIfURLIsNotSecure() |