Generate views.

@return void
557665
public function views()
    {
        $this->make($this->paths->indexPath(), $this->view->generate()->index);
        $this->make($this->paths->createPath(), $this->view->generate()->create);
        $this->make($this->paths->showPath(), $this->view->generate()->show);
        $this->make($this->paths->editPath(), $this->view->generate()->edit);
    }
1166344
public function getViews()
    {
        $config = $this->config;
        $directories = array();
        $dir = $this->directory;
        if (isset($config['app']['views'])) {
            $directoriesTmp = $config['app']['views'];
            if (!is_array($directoriesTmp)) {
                $directoriesTmp = array($directoriesTmp);
            }
            foreach ($directoriesTmp as $directory) {
                $this->addFolder($directories, $dir . '/' . $directory);
            }
        }
        return $directories;
    }
693383
public function installViews()
    {
        $name = $this->getParsedNameInput();

        $path = '/resources/views/' . $name . '/';
        $views = __DIR__ . '/../stubs/views/';

        if ($this->option('lucid')) {
            $service = $this->getParsedServiceInput();

            $path = '/src/Services/' . studly_case($service) . '/resources/views/' . $name . '/';
            $views = ! $this->option('domain')
                ? __DIR__ . '/../stubs/Lucid/views/'
                : __DIR__ . '/../stubs/Lucid/domain-views/';
        }

        if($this->installFiles($path, $this->files->allFiles($views))) {
            $this->info('Copied: ' . $path);
        }
    }
235046
protected function generateView($view, $path)
    {
        $this->call(
            'generate:view',
            array(
                'name'       => $view,
                '--path'     => $path,
                '--template' => $this->getViewTemplatePath($view)
            )
        );
    }
342588
public function render()
    {
        // Prepare details
        $path       = $this->config['settings']['path'];
        $name       = $this->config['settings']['name'] . '/';
        $template   = 'index.tpl.php';
        $functions  = 'functions.php';

        // Include theme specific functions file
        $file = $path . $name . $functions;
        if (is_readable($file)) {
            include $file;
        }

        // Create views for regions, from config-file
        if (isset($this->config['views'])) {
            foreach ($this->config['views'] as $view) {
                $this->di->views->add($view['template'], $view['data'], $view['region'], $view['sort']);
            }
        }

        // Sen response headers, if any.
        $this->di->response->sendHeaders();

        // Create a view to execute the default template file
        $tpl  = $path . $name . $template;
        $data = array_merge($this->config['data'], $this->data);
        $view = $this->di->get('view');
        $view->set($tpl, $data);
        $view->setDI($this->di);
        $view->render();
    }
25022
public function getView()
    {
        if (!$this->_view) {

            $defaultViewsDir = $this->getDI()->get('view')->getViewsDir() . '/' . static::VIEW_DIR_NAME . '/';

            $this->_view = new ViewSimple();
            $this->_view->setViewsDir($this->getOptions('viewsDir', $defaultViewsDir));
        }

        return $this->_view;
    }
167300
private function runView(): void
    {
        $action = ($this->routeAction) ? $this->routeAction : 'index';

        \call_user_func([$this->view, $action]);
    }
241855
public function view() {
		$view = $this->_get_args_for_template_part();
		$view = apply_filters( 'inc2734_wp_view_controller_view', $view );
		Helper\get_template_part( $view['slug'], $view['name'] );
	}
295911
public function getView()
    {
        if($this->view == null) {
            $this->view = new View($this);
        }
        return $this->view;
    }
166674
public function build()
    {
        $view = new View\AtomicKitten;
        $resultFile = new SplFileObject($this->buildSettings['target'] . 'index.html', 'w');
        $resultFile->fwrite($view->render('Generator/Index'));
    }
9937
public function render()
	{
		// make sure we have a correct url
		$this->paginationUrl();

		// and a current page number
		$this->calculateNumbers();

		$urls = array();

		// generate the URL's for the pagination block
		if ($this->config['totalPages'] > 1)
		{
			// calculate start- and end page numbers
			$start = $this->config['current'] - floor($this->config['numberOfLinks'] * $this->config['linkOffset']);
			$end = $this->config['current'] + floor($this->config['numberOfLinks'] * ( 1 - $this->config['linkOffset']));

			// adjust for the first few pages
			if ($start < 1)
			{
				$end -= $start - 1;
				$start = 1;
			}

			// make sure we don't overshoot the current page due to rounding issues
			if ($end < $this->config['current'])
			{
				$start++;
				$end++;
			}

			// make sure we don't overshoot the total
			if ($end > $this->config['totalPages'])
			{
				$start = max(1, $start - $end + $this->config['totalPages']);
				$end = $this->config['totalPages'];
			}

			// now generate the URL's for the pagination block
			for($i = $start; $i <= $end; $i++)
			{
				$urls[$i] = $this->generateUrl($i);
			}
		}

		// send the generated url's to the view
		$this->view->set('urls', $urls);

		// store the current and total pages
		$this->view->set('active', $this->config['current']);
		$this->view->set('total', $this->config['totalPages']);

		// do we need to add a first link?
		if ($this->config['showFirst'])
		{
			$this->view->set('first', $this->generateUrl(1));
		}

		if (isset($start) and $start > 1)
		{
			$this->view->set('previous', $this->generateUrl($start-1));
		}

		if (isset($end) and $end !== $this->config['totalPages'])
		{
			$this->view->set('next', $this->generateUrl($end+1));
		}

		// do we need to add a last link?
		if ($this->config['showLast'])
		{
			$this->view->set('last', $this->generateUrl($this->config['totalPages']));
		}

		$this->view->set('align', $this->config['align']);

		// return the view
		return $this->view;
	}
929859
protected function renderViews()
    {
        if (empty($this->_relViews))
        {
            $message = \Yii::t('dlds/rels/widgets', 'RelTabs widget cannot be generated. No related models exist. Please create at least one relation model first.');
            
            echo \yii\helpers\Html::tag('div', $message, ['class' => 'alert alert-warning']);
        }
        else
        {
            $widget = $this->relViewClass;

            echo $widget::widget(array(
                'items' => $this->_relViews,
                'options' => array(
                    'collapsible' => true,
                ),
            ));
        }
    }
778047
public function generate(): void
    {
        $this->filesystem->mkdir($this->getDirectories());

        foreach ($this->getFiles() as $filePath => $fileContent) {
            $this->filesystem->dumpFile($filePath, $fileContent);
        }

        $this->filesystem->remove($this->clean());
    }
856374
public function addViewsPaths()
    {
        foreach($this->activePlugins() as $plugin){
            view()->addNamespace($plugin->namespaceWithDot(), $plugin->viewsPath());
        }
        return;
    }
918746
public function create()
    {
        $categorias = $this->categoriaRepo->listPub();
        $tags = $this->tagRepo->listPub();

        return view('admin.noticias.create', compact('categorias','tags'));
    }
301634
public function render()
    {
        // Create views for regions, from config-file
        if (isset($this->config["views"])) {
            foreach ($this->config["views"] as $view) {
                $this->di->views->add($view);
            }
        }

        // Get default view to start render from
        $defaultData = [
            "currentRoute" => "route-" . str_replace("/", "-", $this->di->get("request")->getRoute()),
        ];
        $view = $this->config["view"];

        $view["data"] = array_merge_recursive($defaultData, $this->data, $view["data"]);

        if (isset($this->template)) {
            $view["template"] = $this->template;
        }

        // Get the path to the view template file
        $view["template"] = $this->di->get("views")->getTemplateFile($view["template"]);

        // Send response headers, if any.
        $this->di->get("response")->sendHeaders();

        // Execute the default view
        $start = $this->di->get("view");
        $start->setDI($this->di);
        $start->set($view);
        $start->render();
    }
357577
public function generate()
    {
        $files = [];
        $relations = $this->generateRelations();
        $db = $this->getDbConnection();
        foreach ($this->getTableNames() as $tableName) {
            // model :
            $modelClassName = $this->generateClassName($tableName);
            $queryClassName = ($this->generateQuery) ? $this->generateQueryClassName($modelClassName) : false;
            $searchClassName = ($this->generateQuery) ? $this->generateSearchClassName($modelClassName) : false;
            $tableSchema = $db->getTableSchema($tableName);
            $params = [
                'tableName' => $tableName,
                'className' => $modelClassName,
                'queryClassName' => $queryClassName,
                'tableSchema' => $tableSchema,
                'labels' => $this->generateLabels($tableSchema),
                'rules' => $this->generateRules($tableSchema, false, false),
                'filterRules' => $this->generateRules($tableSchema, false, true),
                'relations' => isset($relations[$tableName]) ? $relations[$tableName] : [],
                'behaviors' => $this->generateBehaviors($tableSchema),
            ];
            $files[] = new CodeFile(
                Yii::getAlias('@' . str_replace('\\', '/', $this->ns)) . '/' . $modelClassName . '.php',
                $this->render('model.php', $params)
            );

            if ($queryClassName) {
                $params = [
                    'className' => $queryClassName,
                    'modelClassName' => $modelClassName,
                ];
                $files[] = new CodeFile(
                    Yii::getAlias('@' . str_replace('\\', '/', $this->queryNs)) . '/' . $queryClassName . '.php',
                    $this->render('query.php', $params)
                );
            }

            if ($searchClassName) {
                $params = [
                    'className' => $searchClassName,
                    'modelClassName' => $modelClassName,
                    'queryClassName' => $queryClassName ? $queryClassName : 'ActiveQuery',
                    'labels' => $this->generateLabels($tableSchema),
                    'rules' => $this->generateRules($tableSchema, true, false),
                    'filterRules' => $this->generateRules($tableSchema, true, true),
                    'relations' => isset($relations[$tableName]) ? $relations[$tableName] : [],
                ];
                $files[] = new CodeFile(
                    Yii::getAlias('@' . str_replace('\\', '/', $this->searchNs)) . '/' . $searchClassName . '.php',
                    $this->render('search.php', $params)
                );
            }
        }

        return $files;
    }