Landing page

@return Void
5791
public function adminAction() {
        $ini = Zend_Registry::get('config');
        $pageTitle = 'Garp CMS';
        if (!empty($ini->app->name)) {
            $pageTitle .= ' | ' . $ini->app->name;
        }

        $this->view->imagesCdn = $this->view->assetUrl('') . $ini->cdn->path->upload->image . '/';
        $this->view->documentsCdn = $this->view->assetUrl('') .
            $ini->cdn->path->upload->document . '/';

        $this->view->title = $pageTitle;
        $this->view->locale = $ini->resources->locale->default;
        $this->_helper->layout->setLayout('admin-layout');
    }
972218
protected function startup()
    {
        parent::startup();

        if (!$this->getUser()->isLoggedIn() && $this->presenter->getName() !== "Admin:Login") {
            $this->forward(':Admin:Login:');
        }

        $this->processLanguage();

        // system settings
        $this->settings = new \WebCMS\Settings($this->em, $this->state->language);
        $this->settings->setSettings($this->getSettings());

        // system helper sets variables
        \WebCMS\Helpers\SystemHelper::setVariables(array(
            'baseUrl' => $this->presenter->getHttpRequest()->url->baseUrl,
            'infoEmail' => $this->settings->get('Info email', 'basic')->getValue(),
        ));

        // price formatting
        $this->priceFormatter = new \WebCMS\Helpers\PriceFormatter($this->state->language->getLocale());

        $id = $this->getParam('idPage');
        if ($id) {
            $this->actualPage = $this->em->find('WebCMS\Entity\Page', $id);
        }

        $this->checkPermission();

        $this->logAction();
    }
782510
public function init()
    {
        // If the step is not a registered step exit
        if (!in_array($this->step, CheckoutSteps::getSteps())) {
            $this->redirect($this->Link('/'));
        }

        // If no ReservationSession exists redirect back to the base event controller
        elseif (empty(ReservationSession::get())) {
            $this->redirect($this->Link('/'));
        }

        // If the reservation has been processed end the session and redirect
        elseif (ReservationSession::get()->Status === 'PAID' && $this->step != 'success') {
            ReservationSession::end();
            $this->redirect($this->Link('/'));
        } else {
            $this->reservation = ReservationSession::get();
            parent::init();
        }
    }
122342
public function resetLandingPage() {

		/** @var $wpdb \wpdb */
		global $wpdb;

		update_option( 'show_on_front', 'page' );

		$id = $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_name = 'cover' AND post_type = 'page' AND post_status = 'publish' " );
		if ( $id ) {
			update_option( 'page_on_front', $id );
		}

		$id = $wpdb->get_var( "SELECT ID FROM {$wpdb->posts} WHERE post_name = 'table-of-contents' AND post_type = 'page' AND post_status = 'publish' " );
		if ( $id ) {
			update_option( 'page_for_posts', $id );
		}
	}
719773
public function boot()
  {
      $this->loadViewsFrom(__DIR__.'/resources/views', 'pagination');

      if ($this->app->runningInConsole()) {
          $this->publishes([
              __DIR__.'/resources/views' => $this->app->basePath('resources/views/vendor/pagination'),
          ], 'laravel-pagination');
      }
  }
287080
public function appInit()
    {
        $this->pageStart();

        if ('oxstart' == \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestControllerId() || $this->isAdmin()) {
            return;
        }

        $oSystemEventHandler = $this->_getSystemEventHandler();
        $oSystemEventHandler->onShopStart();
    }
899047
public function boot()
    {
        if (config('adminlte.install_routes', true)) {
            $this->defineRoutes();
        }

        //Publish
        $this->publishHomeController();
        $this->changeRegisterController();
        $this->changeLoginController();
        $this->changeForgotPasswordController();
        $this->publishNoGuestForgotPasswordController();
        $this->changeResetPasswordController();
        $this->publishPublicAssets();
        $this->publishViews();
        $this->publishResourceAssets();
        $this->publishTests();
        $this->publishLanguages();
        $this->publishGravatar();
        $this->publishConfig();
        $this->publishWebRoutes();
        $this->publishApiRoutes();
        $this->publishDusk();
        $this->publishDatabaseConfig();

        $this->enableSpatieMenu();
    }
298034
public function paginate()
    {
        $this->count = $this->query->get()->count();
        $this->limit = $this->limit ?: $this->count;
        $this->query->skip($this->offset)->take($this->limit);
    }
427305
public function run()
    {
        // Load routing user config file
        $this->routes();
        // Launch routage
        Router::resolve();
        // Load databases user config file
        $this->databases();
        // Load Bootstrap
        $this->bootstrap();
        // Launch Controller defined by routage
        $bodyContent = $this->controller();
        // Show body content return by Controller
        echo $bodyContent;
    }
1320682
private function createSinglePage()
    {
        if (isset($this->config['single_pages'])) {
            $themes = $this->config['single_pages'];
            foreach ($themes as $key => $v) {
                $theme_page = $this->source_dir.DIRECTORY_SEPARATOR . $v;
                if ( file_exists($theme_page) ) {
                    $file_path = $this->public_dir . DIRECTORY_SEPARATOR . $key . '/index.html';
                    $html = $this->renderArticle($theme_page, true);
                    $this->fileSys->create($file_path, $html);
                }
            }
        }
    }
547167
public function doAfter() {
        if ($this->_footerController) {
            $viewPath = ROOT . DS . 'app' . DS . 'views' . DS .
                strtolower($this->_controller->getControllerName()) . DS .
                strtolower($this->_controller->getAction()) . DS . 'footer.php';
            if (file_exists($viewPath)) {
                $this->_controller->addView(FView::create(strtolower($this->_controller->getControllerName()) . DS .
                    strtolower($this->_controller->getAction()) . DS . 'footer.php', $this->getController()->getApp()));
            } elseif ($this->_footerGlobal) {
                $viewPath = ROOT . DS . 'app' . DS . 'views' . DS . 'footer.php';
                if (file_exists($viewPath)) {
                    $this->_controller->addView(FView::create('footer.php', $this->getController()->getApp()));
                }
            }
        }
    }
429676
public function boot()
    {
        // Lumen is limited, so always add the preflight.
        if ($this->isLumen()) {
            $this->app->middleware([HandlePreflight::class]);
        } else {
            $this->publishes([$this->configPath() => config_path('cors.php')]);

            /** @var \Illuminate\Foundation\Http\Kernel $kernel */
            $kernel = $this->app->make(Kernel::class);

            // When the HandleCors middleware is not attached globally, add the PreflightCheck
            if (! $kernel->hasMiddleware(HandleCors::class)) {
                $kernel->prependMiddleware(HandlePreflight::class);
            }
        }
    }
391885
public function run()
    {
        $this->seed([
            [
                'group'       => [
                    'name'        => 'SEO',
                    'slug'        => 'seo',
                    'description' => 'SEO permissions group',
                ],
                'permissions' => array_merge(
                    $this->getDashboardSeeds(),
                    $this->getPagesSeeds(),
                    $this->getFootersSeeds(),
                    $this->getMetasSeeds(),
                    $this->getRedirectsSeeds()
                ),
            ],
        ]);
    }
995050
protected function Init()
    {
        $this->page = new Page(Request::GetData('page'));
        $this->parent = Page::Schema()->ByID(Request::GetData('parent'));
        $this->previous = Page::Schema()->ByID(Request::GetData('previous'));
        $this->site = $this->page->Exists() ? $this->page->GetSite() : 
            Site::Schema()->ByID(Request::GetData('site'));
        
        $this->dateFormat = Trans('Core.DateFormat');
        $this->InitPageRights();
        
        if (!$this->page->Exists() && !$this->site->Exists())
        {
            Response::Redirect(BackendRouter::ModuleUrl(new SiteList()));
            return true;
        }
        $this->AddLayoutField();
        $this->AddNameField();
        $this->AddUrlField();
        $this->AddTitleField();
        $this->AddDescriptionField();
        $this->AddKeywordsField();
        $this->AddMenuAccessField();
        $this->AddUserGroupField();
        $this->AddGuestsOnlyField();
        $this->AddMemberGroupField();
        $this->AddPublishField();
        $this->AddSubmit();
        $this->AddPublishFromDateField();
        $this->AddPublishFromHourField();
        $this->AddPublishFromMinuteField();
        $this->AddPublishToDateField();
        $this->AddPublishToHourField();
        $this->AddPublishToMinuteField();
        $this->AddSitemapRelevanceField();        
        $this->AddSitemapChangeFrequencyField();
        $this->AddTypeField();
        $this->AddRedirectTargetSelector();
        return parent::Init();
    }
864740
protected function setup() {
		// Clear global hashes.
		$this->urls        = $this->predef_urls;
		$this->titles      = $this->predef_titles;
		$this->html_hashes = array();
		$this->in_anchor   = false;
	}
735394
public function new_page()
    {
        $this->_page_number++;
        $this->_page_count++;

        $this->_img = imagecreatetruecolor($this->_actual_width, $this->_actual_height);

        $this->_bg_color = $this->_allocate_color($this->_bg_color_array);
        imagealphablending($this->_img, true);
        imagesavealpha($this->_img, true);
        imagefill($this->_img, 0, 0, $this->_bg_color);

        $this->_imgs[] = $this->_img;
    }
1189330
public function render(): void
	{
		$page = $this->paginator->page;
		if ($this->paginator->pageCount < 2) {
			$steps = [$page];
			$viewed = false;
		} else {
			$viewed = true;

			$f = $first = $page - $this->pageAround;
			$l = $last = $page + $this->pageAround;
			if ($f < $this->paginator->firstPage) {
				$last += ($this->paginator->firstPage - $f);
			}
			if ($l > $this->paginator->lastPage) {
				$first -= ($l - $this->paginator->lastPage);
			}
			$arr = range(max($this->paginator->firstPage, $first), min($this->paginator->lastPage, $last));

			if ($this->othersPage > 0) {
				$count = $this->othersPage * 2;
				$quotient = ($this->paginator->pageCount - 1) / $count;
				for ($i = 0; $i <= $count; $i++) {
					$arr[] = round($quotient * $i) + $this->paginator->firstPage;
				}
				sort($arr);
				$steps = array_values(array_unique($arr));
			} else {
				$steps = $arr;
			}
		}

		$this->template->viewed = $viewed;
		$this->template->steps = $steps;
		$this->template->paginator = $this->paginator;
		$this->template->isAjax = $this->isAjax;
		$this->template->noHistory = $this->noHistory;
		$this->template->prev = $this->prev;
		$this->template->next = $this->next;
		$this->template->other = $this->other;
		if (count($this->onClick ?? []) > 0) {
			$this->template->handle = 'click!';
		} else {
			$this->template->handle = 'this';
		}

		$this->template->setFile($this->templateFile);
		$this->template->render();
	}