Override method view of AbstractBase.
By now, we will get assets from theme if it exists.
@param $viewName
@param null $data
@param null|string $module
@return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
514418
protected function view($viewName, $data = null, $module = null)
    {
        if ($data === null) {
            $data = $this->dis;
        }

        if ($module === null) {
            $module = $this->currentThemeName;
        }

        if(view()->exists($module . '::' . $viewName)) {
            return view($module . '::' . $viewName, $data);
        }
        return view($viewName, $data);
    }
1311643
protected function view($name, array $data = [])
    {
        $this->viewExistsOrFail($name);

        $this->data = array_merge($this->data, $data);

        $this->beforeViewRender();
        $view = $this->renderView($name);
        $this->afterViewRender();

        return $view;
    }
835893
public function getTemplateFile($filename, $data)
    {
        $data['getRegion'] = function($name) { 
            return $this->getRegion($name); 
            }; // This is for mustache compatibility

        // Push the data into regions and then pass a pointer to this class to the layout
        // $this->setRegions($data);
        return parent::getTemplateFile($filename, $data); // Pass in layout object to template
    }
107537
public static function getView($viewName, $data = null, $templateRootFolder = null)
    {
        $view = new \erdiko\core\View($viewName, $data);

        if ($templateRootFolder !== null) {
            $view->setTemplateRootFolder($templateRootFolder);
        }
        return  $view->toHtml();
    }
764597
public static function view(string $view, array $data = [])
  {
    $global = Self::$variables::get();
    $data = array_merge($global, $data);

    return Self::$view->view($view, $data);
  }
452507
public static function view( $view = null, array $data = [] ) {
		if ( func_num_args() === 0 ) {
			return self::factory();
		}

		return self::factory()->make( $view, $data );
	}
179411
public function load( $data, $formName = null ) {

		if( isset( $formName ) && isset( $data[ $formName ] ) ) {

			$this->data	= $data[ $formName ];
		}

		return parent::load( $data, $formName );
	}
542647
public static function render($template, $data = [])
    {
        // @var \Illuminate\View\Factory $factory
        $factory = self::instance()->view();

        // @var \Illuminate\Contracts\View\View $view
        $view = $factory->make($template, $data);

        return $view->render();
    }
795281
protected function view(DataMap $params, ?string $viewName = null): ViewResult
    {
        if ($viewName == null) {
            $routeInfo = Application::$app->routeInfo;
            $viewName = $routeInfo->controllerName . '/' . $routeInfo->actionName;
        }
        return new ViewResult($viewName, $this->layout, $params);
    }
723863
public function moduleContent($moduleName)
    {
        if ($this->isAdminContext() || empty($moduleName) || count($this->getEnvOptions()) === 0 || !Yii::$app->hasModule($moduleName)) {
            return;
        }
        
        // get module
        $module = Yii::$app->getModule($moduleName);
        $module->context = 'cms';
        
        // start module reflection
        $reflection = Yii::createObject(['class' => ModuleReflection::class, 'module' => $module]);
        $reflection->suffix = $this->getEnvOption('restString');

        $args = Json::decode($this->getCfgValue('moduleActionArgs', '{}'));
        
        // if a controller has been defined we inject a custom starting route for the
        // module reflection object.
        $ctrl = $this->getCfgValue('moduleController');
        if (!empty($ctrl)) {
            $reflection->defaultRoute($ctrl, $this->getCfgValue('moduleAction', 'index'), $args);
        }
        
        if ($this->getCfgValue('strictRender')) {
            $reflection->setRequestRoute(implode("/", [$this->getCfgValue('moduleController', $module->defaultRoute), $this->getCfgValue('moduleAction', 'index')]), $args);
        } else {
            Yii::$app->request->queryParams = array_merge($reflection->getRequestRoute()['args'], Yii::$app->request->queryParams);
        }

        $response = $reflection->run();
        
        if ($response instanceof Response) {
            return Yii::$app->end(0, $response);
        }
        
        return $response;
    }
999791
protected function viewInstance($view, $path, $data)
    {
        return new View($this, $this->getEngineFromPath($path), $view, $path, $data);
    }
197478
public function renderView($viewPath, array $data = null)
    {
        $this->setView($viewPath);

        !$data or extract($data);
        ob_start();

        if (file_exists(rtrim(
                $this->getViewPath(), $this->getFileExt()
            ) . $this->getFileExt())) {

            /** @noinspection PhpIncludeInspection */
            include rtrim(
                    $this->getViewPath(), $this->getFileExt()
                ) . $this->getFileExt();

        } elseif (file_exists(rtrim(
                $this->getViewFallbackPath(), $this->getFileExt()
            ) . $this->getFileExt())) {

            /** @noinspection PhpIncludeInspection */
            include rtrim(
                    $this->getViewFallbackPath(), $this->getFileExt()
                ) . $this->getFileExt();

        } else {
            throw new ViewNotFoundException('View ' . rtrim(
                    $this->getViewPath(), $this->getFileExt()
                ) . $this->getFileExt() . ' not found');
        }

        $rendered = ob_get_contents();
        ob_end_clean();

        return $rendered;
    }
1225191
function byModule($moduleName)
    {
        if (!$this->hasLoaded($moduleName))
            $this->loadModule($moduleName);

        return $this->_c__loadedModules[$moduleName];
    }
834946
public function loadView($viewName, $pData = NULL, $asString = false) {
		if(!URequest::isAjax() && $this->_getAuthController()->_displayInfoAsString()){
			$this->view->setVar("_userInfo",$this->_getAuthController()->info());
		}
		return parent::loadView ($viewName,$pData,$asString);
	}
574940
public function loadBladeTemplate($view, $module, array $args = array())
    {
        \Modularity\Helper\File::maybeCreateDir(MODULARITY_CACHE_DIR);

        if (!$module->templateDir) {
            throw new \LogicException('Class ' . get_class($module) . ' must have property $templateDir');
        }

        $template = \Modularity\Helper\Template::getModuleTemplate($view, $module);
        $templatePath = trailingslashit(dirname($template));
        $view = basename($template, '.blade.php');
        $view = basename($view, '.php');

        if (\Modularity\Helper\Template::isBlade($template)) {
            $blade = new Blade($templatePath, MODULARITY_CACHE_DIR);
            return $blade->view()->make($view, $module->data)->render();
        }

        return $this->loadTemplate($template, $module, $args);
    }
631885
public function render($templateName = null, $data = [])
    {
        $this->setTemplate($templateName, $data);

        return json_encode($this->_data);
    }
259011
public function make($view, $data = [])
    {
        try {
            return $this->view->make($view, $data)->render();
        } catch (\InvalidArgumentException $e) {
            throw new ViewNotFoundException("No file found at '{$view}'");
        }
    }