Export the authentication views.

@return void
549606
protected function exportViews()
    {
        foreach ($this->views as $key => $value) {
            if (file_exists($view = $this->getViewPath($value)) && ! $this->option('force')) {
                if (! $this->confirm("The [{$value}] view already exists. Do you want to replace it?")) {
                    continue;
                }
            }

            copy(
                __DIR__.'/stubs/make/views/'.$key,
                $view
            );
        }
    }
1209433
protected function generateViews()
    {
        $viewsDir = app_path().'/views';
        $container = $viewsDir . '/' . Pluralizer::plural($this->model);
        $layouts = $viewsDir . '/layouts';
        $views = array('index', 'show', 'create', 'edit');

        $this->generator->folders(
            array($container)
        );

        // If generating a scaffold, we also need views/layouts/scaffold
        if (get_called_class() === 'Fly\\Generators\\Commands\\ScaffoldGeneratorCommand')
        {
            $views[] = 'scaffold';
            $this->generator->folders($layouts);
        }

        // Let's filter through all of our needed views
        // and create each one.
        foreach($views as $view)
        {
            $path = $view === 'scaffold' ? $layouts : $container;
            $this->generateView($view, $path);
        }
    }
1131980
protected function generateView()
    {
        if ($this->option('parent') || $this->option('model') || $this->option('resource')) {
            if ($this->option('parent')) {
                $name = $this->qualifyClass('Model/ChildController');
            } else {
                $name = $this->qualifyClass('ModelController');
            }
            $path = $this->getViewPath($name);

            if (!$this->files->exists(str_replace_last('.blade.php', '/index.blade.php', $path))) {
                foreach ([ 'index', 'create', 'show', 'edit' ] as $key => $method) {
                    $this->makeDirectory(str_replace_last('.blade.php', '/' . $method . '.blade.php', $path));
                    $this->files->put(str_replace_last('.blade.php', '/' . $method . '.blade.php', $path), $this->buildView($name, $method));
                }
            }
        }

        $name = $this->qualifyClass($this->getNameInput());
        $path = $this->getViewPath($name);

        if ($this->option('parent') || $this->option('model') || $this->option('resource')) {
            foreach ([ 'index', 'create', 'show', 'edit' ] as $key => $method) {
                $this->makeDirectory(str_replace_last('.blade.php', '/' . $method . '.blade.php', $path));
                $this->files->put(str_replace_last('.blade.php', '/' . $method . '.blade.php', $path), $this->buildView($name, $method));
            }
        } else {
            $this->makeDirectory($path);
            $this->files->put($path, $this->buildView($name));
        }

        $this->info('View also generated successfully.');
    }
117306
public function output()
    {
        // If the view file exists
        if ($this->hasFile()) {
            // Extract all view variables
            extract($this->getVars());
            ob_start();
            include($this->getPath() . '/' . $this->getFile(true));
            $html = ob_get_contents();
            ob_end_clean();
            return $html;
        } else {
            die('Fatal Error: ' . $this->getPath() . '/' . $this->getFile(true) . ' does not exist.');
        }
    }
383940
public function exportAction()
	{
		if( config( 'shop.authorize', true ) ) {
			$this->authorize( 'admin', [JqadmController::class, ['admin', 'editor']] );
		}

		$cntl = $this->createAdmin();

		if( ( $html = $cntl->export() ) == '' ) {
			return $cntl->getView()->response();
		}

		return $this->getHtml( $html );
	}
987445
public function exportFileListAction()
    {
        //autoryzacja
        $this->_authenticate();
        //json z plikami
        return json_encode((new Model\ConnectorModel)->getFileList($this->getPost()->fileObjects));
    }
237722
public function exportAction()
    {
        if ($this->exportSnippets) {
            $params = $this->_processParameters($this->exportParameters);

            $this->addSnippets($this->exportSnippets, $params);
        }
    }
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();
    }
501293
protected function exportForms()
    {
        foreach ($this->forms as $pathIn => $pathOut) {
            if ($this->files->exists($form = app_path('Forms/'.$pathOut)) && ! $this->option('force')) {
                if (! $this->confirm("The [{$pathOut}] form already exists. Do you want to overwrite it?")) {
                    continue;
                }
            }

            $this->files->put(
                $form,
                $this->compileStub($this->files->get(__DIR__.'/stubs/make/forms/'.$pathIn))
            );
        }
    }
1250573
private function generateViews()
    {
        $viewInstance = View::instance($this);
        $viewInstance->setLayoutType($this->viewType);
        $viewTemplateDir = dirname(dirname(__FILE__)).DS.'src'.DS.'Apps'.DS.'Views'.DS;
        $viewInstance->setTableColumns($this->columns);
        $viewInstance->setViewTemplatePath($viewTemplateDir);

        // generate twig template layout if type has set via user
        if ($this->viewType == 'php') {
            // Type not set then we will generate php layout
            $viewInstance->generateLayout('layouts');
        } else {
            $viewInstance->generateLayout('layouts.main');
        }

        $viewInstance->generateViews();

        $this->info(
            'Views Generated In '.str_replace('Controller', '', $this->controller).' Directory..'
        );
    }
981639
public function actionExport() {
        // Initialize export array.
        $data = [
            'siteGroups' => [],
            'sites' => [],
            'routes' => [],
            'fieldGroups' => [],
            'volumes' => [],
            'transforms' => [],
            'tagGroups' => [],
            'categoryGroups' => [],
            'sections' => [],
            'fields' => [],
            'entryTypes' => [],
            'globalSets' => [],
            'userGroups' => [],
            'users' => [],
        ];
        // The list of exportable items.
        $exportList = [
            'sites' => [
                'bodyParam' => 'siteSelection',
                'postProcess' => [
                    'groupId' => 'siteGroups'
                ],
            ],
            'sections' => [
                'bodyParam' => 'sectionSelection',
                'postProcess' => [
                    'entryTypes' => 'entryTypes'
                ],
            ],
            'routes' => [
                'bodyParam' => 'routeSelection',
            ],
            'volumes' => [
                'bodyParam' => 'volumeSelection',
            ],
            'transforms' => [
                'bodyParam' => 'assetTransformSelection',
            ],
            'tagGroups' => [
                'bodyParam' => 'tagSelection',
            ],
            'categoryGroups' => [
                'bodyParam' => 'categorySelection',
            ],
            'fields' => [
                'bodyParam' => 'fieldSelection',
                'postProcess' => [
                    'groupId' => 'fieldGroups'
                ],
            ],
            'globalSets' => [
                'bodyParam' => 'globalSelection',
            ],
            'userGroups' => [
                'bodyParam' => 'userGroupSelection',
            ],
            'users' => [
                'bodyParam' => 'userSelection',
            ]
        ];

        foreach ($exportList as $processorName => $processorInfo) {
            $exportIds = Craft::$app->request->getBodyParam($processorInfo['bodyParam']);
            if ($exportIds) {
                foreach ($exportIds as $exportId) {
                    if ($processorName === 'routes') {
                        $exportObj = Architect::$processors->$processorName->exportByUid($exportId);
                    } else {
                        $exportObj = Architect::$processors->$processorName->exportById($exportId);
                    }

                    if (isset($processorInfo['postProcess'])) {
                        foreach ($processorInfo['postProcess'] as $postProcessKey => $postProcessorName) {
                            switch ($postProcessKey) {
                                case 'groupId':
                                    $groupName = Architect::$processors->$postProcessorName->exportById($exportObj[$postProcessKey]);
                                    if (\in_array($groupName, $data[$postProcessorName], false) === false) {
                                        $data[$postProcessorName][] = $groupName;
                                    }
                                    unset($exportObj[$postProcessKey]);
                                    break;
                                case 'entryTypes':
                                    if (isset($exportObj[$postProcessKey]) && \is_array($exportObj[$postProcessKey])) {
                                        $data[$postProcessorName] = array_merge($data[$postProcessorName], $exportObj[$postProcessKey]);
                                        unset($exportObj[$postProcessKey]);
                                    }
                                    break;
                            }
                        }
                    }

                    $data[$processorName][] = $exportObj;
                }
            }
        }

        foreach ($data as $key => $value) {
            if (\count($value) <= 0) {
                unset($data[$key]);
            }
        }

        $this->renderTemplate('architect/export_results', [ 'dump' => json_encode($data, JSON_PRETTY_PRINT) ]);
    }
244142
protected function exportControllers()
    {
        foreach ($this->controllers as $pathIn => $pathOut) {
            if ($this->files->exists($controller = app_path('Http/Controllers/'.$pathOut))
                && ! $this->option('force')) {
                if (! $this->confirm("The [{$pathOut}] controller already exists. Do you want to overwrite it?")) {
                    continue;
                }
            }

            $this->files->put(
                $controller,
                $this->compileStub($this->files->get(__DIR__.'/stubs/make/controllers/'.$pathIn))
            );
        }
    }
182060
public function viewify($views)
    {
        foreach ($views as $views) {
            foreach ($this->add($views) as $view) {
                $this->di->get("view")->add($view["view"], $view["content"], $view["region"]);
            }
        }
    }
1167603
public function createPermissionsView()
    {
        $schemasPath = __DIR__ . DIRECTORY_SEPARATOR . 'schemas';
        if (is_dir($schemasPath)) {
            $fileSystem = app('files');
            $files      = $fileSystem->allFiles($schemasPath);
            foreach ($files as $file) {
                DB::unprepared($file->getContents());
            }
        }
    }
427549
public function execute()
    {
        //authenticate
        if ($this->authenticate()) {
            if ($this->helper->getFeefoLogon()) {
                $this->_view->loadLayout();
                $this->_view->renderLayout();
            }
        }
    }
1148256
public function includePackagesViewsFunctions()
    {
        $_assets_package = Package::createFromAssetsLoader($this->assets_loader);
        foreach ($this->assets_loader->getAssetsDb() as $package=>$config) {
            if (!empty($config['views_functions'])) {
                $assets_package = clone $_assets_package;
                $assets_package->loadFromArray($config);
                foreach ($assets_package->getViewsFunctionsPaths() as $fcts) {
                    $fct_file = $assets_package->getFullPath($fcts);
                    if (@file_exists($fct_file)) {
                        @include_once $fct_file;
                    }
                }
            }
        }
    }
465276
private static function auth()
    {
        $files = ['Auth'];
        $folder = static::$root.'Authentication'.'/';

        self::call($files, $folder);

        $files = ['AuthenticationModelNotFoundException'];
        $folder = static::$root.'Authentication/Exceptions'.'/';

        self::call($files, $folder);
    }