public function view($view, $data = array()) { if (!is_null($this->layout)) { $data['theme_layout'] = $this->getLayout(); } return $this->viewFactory->make($this->getView($view), $data); }