/** * Creates a new view based on the current theme * If the view cannot be found in the theme it's going to use the app::views * * @param string $file * @param array $data * @param bool $encode * @return CCView */ public function view($file = null, $data = null, $encode = false) { if (\CCView::exists($view = static::view_namespace() . '::' . $file)) { return \CCView::create($view, $data, $encode); } return \CCView::create($file, $data, $encode); }