src/Controller/Component/UserToolComponent.php
protected function _mapAction($action) {
		$actionMap = $this->getConfig('actionMap');
		if (isset($actionMap[$action]) && method_exists($this, $actionMap[$action]['method'])) {
			$pass = (array)$this->_getRequest()->param('pass');
			call_user_func_array([$this, $actionMap[$action]['method']], $pass);

			if ($this->_redirectResponse instanceof Response) {
				return $this->_redirectResponse;
			}

			if (is_string($actionMap[$action]['view'])) {
				try {
					return $this->getController()->render($this->getController()->request->param('action'));
				} catch (MissingTemplateException $e) {
					return $this->getController()->render($actionMap[$action]['view']);
				}
			}

				return $this->_getResponse();
			}

		return false;
	}
protected function _mapAction($action) {
		$actionMap = $this->getConfig('actionMap');
		if (isset($actionMap[$action]) && method_exists($this, $actionMap[$action]['method'])) {
			$pass = (array)$this->_getRequest()->param('pass');
			call_user_func_array([$this, $actionMap[$action]['method']], $pass);

			if ($this->_redirectResponse instanceof Response) {
				return $this->_redirectResponse;
			}

			if (is_string($actionMap[$action]['view'])) {
				try {
					return $this->getController()->render($this->getController()->request->param('action'));
				} catch (MissingTemplateException $e) {
					return $this->getController()->render($actionMap[$action]['view']);
				}
			}

				return $this->_getResponse();
			}

		return false;
	}
protected function _mapAction ( $ action ) { $ actionMap = $ this -> getConfig ( 'actionMap' ) ; if ( isset ( $ actionMap [ $ action ] ) && method_exists ( $ this , $ actionMap [ $ action ] [ 'method' ] ) ) { $ pass = ( array ) $ this -> _getRequest ( ) -> param ( 'pass' ) ; call_user_func_array ( [ $ this , $ actionMap [ $ action ] [ 'method' ] ] , $ pass ) ; if ( $ this -> _redirectResponse instanceof Response ) { return $ this -> _redirectResponse ; } if ( is_string ( $ actionMap [ $ action ] [ 'view' ] ) ) { try { return $ this -> getController ( ) -> render ( $ this -> getController ( ) -> request -> param ( 'action' ) ) ; } catch ( MissingTemplateException $ e ) { return $ this -> getController ( ) -> render ( $ actionMap [ $ action ] [ 'view' ] ) ; } } return $ this -> _getResponse ( ) ; } return false ; }
Maps an action of the controller to the component

@param string $action Action name
@return bool|\Cake\Http\Response
Maps an action of the controller to the component