<?php
namespace App\Presenters;
use Nette,
App\Model;
/**
* Base presenter for all application presenters.
* @author Jiřička Jakub <info@jirickajakub.cz>
* @package Admin
*/
abstract class BasePresenter extends Nette\Application\UI\Presenter {
// Import Autowired extension
use \Kdyby\Autowired\AutowireProperties;
use \Kdyby\Autowired\AutowireComponentFactories;
// Startup function for loging
public function startup() {
parent::startup();
if (!$this->user->isLoggedIn()) {
$this->flashMessage('Musíte být přihlášeni!', 'alert alert-danger');
$this->redirect('Sign:in', ['backlink' => $this->storeRequest()]);
}
}
// Signout function
public function handleSignOut() {
$this->getUser()->logout();
$this->flashMessage('Byly jste úspěšně odhlášeni!', 'alert alert-success');
$this->redirect('Sign:in');
}
}
Fatal error: Uncaught Error: Class "Nette\Application\UI\Presenter" not found in /in/lotFs:13
Stack trace:
#0 {main}
thrown in /in/lotFs on line 13
Process exited with code 255.
Output for 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Uncaught Error: Class 'Nette\Application\UI\Presenter' not found in /in/lotFs:13
Stack trace:
#0 {main}
thrown in /in/lotFs on line 13
Process exited with code 255.