public function __switchboard($type = 'view') { $this->_type = $type; if (!isset($this->_context[0]) || in_array(trim($this->_context[0]), ['', 'saved', 'completed'])) { $this->_function = 'index'; } else { $this->_function = $this->_context[0]; } parent::__switchboard($type); }
public function __switchboard($type = 'view') { $this->_type = $type; if (!isset($this->_context[0]) || trim($this->_context[0]) == '') { $this->_function = 'index'; } else { $this->_function = $this->_context[0]; } parent::__switchboard($type); }