From cb1d5649e6feb18377a819d7a7284a644905cdd0 Mon Sep 17 00:00:00 2001 From: Jad Bitar Date: Wed, 6 Feb 2019 09:45:40 -0500 Subject: [PATCH] Change access to deprecated property `CrudViewHelper::$request` --- src/View/Helper/CrudViewHelper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/View/Helper/CrudViewHelper.php b/src/View/Helper/CrudViewHelper.php index a2ce79e7..4014b8a4 100644 --- a/src/View/Helper/CrudViewHelper.php +++ b/src/View/Helper/CrudViewHelper.php @@ -309,7 +309,7 @@ public function relation($field) */ public function redirectUrl() { - $redirectUrl = $this->request->getQuery('_redirect_url'); + $redirectUrl = $this->getView()->getRequest()->getQuery('_redirect_url'); $redirectUrlViewVar = $this->getViewVar('_redirect_url'); if (!empty($redirectUrlViewVar)) { @@ -351,7 +351,7 @@ public function createRelationLink($alias, $relation, $options = []) 'action' => 'add', '?' => [ $relation['foreignKey'] => $this->getViewVar('primaryKeyValue'), - '_redirect_url' => $this->request->getUri()->getPath() + '_redirect_url' => $this->getView()->getRequest()->getUri()->getPath() ] ], $options @@ -432,7 +432,7 @@ public function getViewVar($key = null) */ public function getCssClasses() { - $action = (string)$this->request->getParam('action'); + $action = (string)$this->getView()->getRequest()->getParam('action'); $pluralVar = $this->getViewVar('pluralVar'); $viewClasses = (array)$this->getViewVar('viewClasses'); $args = func_get_args();