/** * construct function */ public function __construct($controller, $action) { parent::__construct($controller, $action); $um = new UserModel(); $this->user = $um->loadUser(); $this->setView('curUser', $this->user); }
public function __construct() { parent::__construct(); $this->instagramModel = new \blogg\model\instagram\InstagramModel($this->settings->getInstagramSettings()); $this->setView(new \blogg\view\instagram\InstagramView()); $this->numberOfImages = $this->settings->getInstagramSettings()->numberOfImages; }
public function __construct() { parent::__construct(); $this->check_session(); $this->controllerName = "PuntosVenta"; $this->load->model('common_model'); }
public function __construct() { parent::__construct(); if (!BEUsersHelper::isAdmin()) { Redirect::to('/'); } }
public function __construct(PaymentRepository $paymentRepo, InvoiceRepository $invoiceRepo, AccountRepository $accountRepo) { parent::__construct(); $this->paymentRepo = $paymentRepo; $this->invoiceRepo = $invoiceRepo; $this->accountRepo = $accountRepo; }
public function __construct(AccountRepository $accountRepo, ContactMailer $contactMailer, UserMailer $userMailer) { parent::__construct(); $this->accountRepo = $accountRepo; $this->contactMailer = $contactMailer; $this->userMailer = $userMailer; }
/** * FlightsController constructor. */ public function __construct() { parent::__construct('Flight'); /* Template & Navbar par default */ $this->dsp->template = 'layouts.templates.manager'; return true; }
public function __construct($request, $response) { /*{{{*/ parent::__construct($request, $response); $response->module = Space::MODULE_THREAD; $response->unDisplaySubMenu = true; }
public function __construct() { parent::__construct(); $this->seo_set(); $this->docModel = M('Document'); $this->model = D('Store'); }
public function __construct(Vocabulary $vocabulary) { parent::__construct(); $this->vocabulary = $vocabulary; $this->route_prefix = rtrim(Config::get('taxonomy::route_prefix'), '.') . '.'; View::composer('taxonomy::*', 'Devfactory\\Taxonomy\\Composers\\TaxonomyComposer'); }
/** * Create a new API User controller. * * @param UserRepositoryInterface $users * * @return ApiUserController */ public function __construct(UserRepositoryInterface $users) { parent::__construct(); $this->users = $users; $this->beforeFilter('auth'); $this->beforeFilter('csrf_header', array('only' => array('store', 'update', 'destroy'))); }
public function __construct(IRetailerRepository $retailer) { parent::__construct(); $this->adminId = Auth::id(); $this->address = new Address(); $this->retailer = $retailer; }
public function __construct($id, $module = null) { parent::__construct($id, $module); // If there is a post-request, redirect the application to the provided url of the selected language if (isset($_POST['language'])) { $lang = $_POST['language']; $MultilangReturnUrl = $_POST[$lang]; $this->redirect($MultilangReturnUrl); } // Set the application language if provided by GET, session or cookie if (isset($_GET['language'])) { Yii::app()->language = $_GET['language']; Yii::app()->user->setState('language', $_GET['language']); $cookie = new CHttpCookie('language', $_GET['language']); $cookie->expire = time() + 60 * 60 * 24 * 365; // (1 year) Yii::app()->request->cookies['language'] = $cookie; $_COOKIE['language'] = Yii::app()->request->cookies['language']->value; } else { if (Yii::app()->user->hasState('language')) { Yii::app()->language = Yii::app()->user->getState('language'); } else { if (isset(Yii::app()->request->cookies['language'])) { Yii::app()->language = Yii::app()->request->cookies['language']->value; } } } if ($_POST['server']) { $url = str_ireplace($_COOKIE['server'], $_POST['server'], Yii::app()->request->requestUri); Yii::app()->request->cookies['server'] = new CHttpCookie('server', strtolower($_POST['server'])); $this->redirect($url); } }
public function __construct() { parent::__construct(); $this->load->model('admin/info_model'); $this->lang->load('common', $this->session->userdata('lang_file')); $this->siteTitle = 'Account Soft | '; }
function __construct() { parent::__construct(); $this->data['layout'] = 'adminhtml'; $this->data['header'] = 'Data Jurnal Mahasiswa'; //$this->helper('Data'); }
function __construct() { parent::__construct(); $this->form_validation->set_error_delimiters('<span class="error">', '</span>'); $this->load->model('Datasets_model'); $this->load->model('User_model'); }
/** * Constructor */ public function __construct(SettingInterface $settings, RegisterForm $registerForm) { parent::__construct(); $this->settings = $settings; $this->registerForm = $registerForm; $this->beforeFilter('checkInstalled', ['only' => ['store', 'index']]); }
/** * TraductionsController constructor. */ public function __construct() { parent::__construct('Traduction'); /* Template & Navbar par default */ $this->dsp->template = 'layouts.templates.test'; return true; }
public function __construct(Registry $registry) { parent::__construct($registry, 'A_Publishers'); $this->_template->publisherTitles = ['Publishers', 'New Publisher', 'Publisher Details', 'Update Publisher']; if (isset($this->_urlBits[1]) && $this->_urlBits[1] == 'publishers') { if (isset($this->_urlBits[2]) && $this->_urlBits[2] == 'create') { $this->createNewPublisher(); } elseif (isset($this->_urlBits[2]) && isset($this->_urlBits[3])) { $publisherId = filter_var($this->_urlBits[3], FILTER_VALIDATE_INT); switch ($this->_urlBits[2]) { case 'view': $this->viewPublisher($publisherId); break; case 'update': $this->updatePublisher($publisherId); break; default: $this->showAuthors(); break; } } else { $this->showPublishers(); } } else { $this->_registry->redirectTo(); } }
public function __construct() { parent::__construct(); $this->load->model('organization/info_model'); $this->lang->load('common', $this->session->userdata('lang_file')); $this->siteTitle = 'Wab Association Board | '; }
public function __construct(ImageTransformer $transformer, PaginatorTransformer $paginatorTransformer) { parent::__construct(); $this->transformer = $transformer; $this->paginatorTransformer = $paginatorTransformer; $this->validateOwnership(new Image()); }
public function __construct() { parent::__construct(); /* This checks the client list for the CID. If a matching CID is found, all caching will be ignored for this request */ if (Cache::has('clients')) { $clients = Cache::get('clients'); } else { $clients = Client::all(); Cache::put('clients', $clients, 1); } if (Cache::has('keys')) { $keys = Cache::get('keys'); } else { $keys = Key::all(); Cache::put('keys', $keys, 1); } $input_cid = Input::get('cid'); if (!empty($input_cid)) { foreach ($clients as $client) { if ($client->uuid == $input_cid) { $this->client = $client; } } } $input_key = Input::get('k'); if (!empty($input_key)) { foreach ($keys as $key) { if ($key->api_key == $input_key) { $this->key = $key; } } } }
public function __construct($action, $urlValues) { parent::__construct($action, $urlValues); //create the model object require "models/home.php"; $this->model = new HomeModel(); }
public function __construct(LiveCart $application) { if ($application->getConfig()->get('SSL_BACKEND')) { $application->getRouter()->setSslAction(''); } parent::__construct($application); if (!isset($_SERVER['HTTP_USER_AGENT'])) { $_SERVER['HTTP_USER_AGENT'] = 'Firefox'; } // no IE yet if (preg_match('/MSIE/', $_SERVER['HTTP_USER_AGENT'])) { ClassLoader::import('application.controller.backend.UnsupportedBrowserException'); throw new UnsupportedBrowserException(); } if (!$this->user->hasBackendAccess() && !$this instanceof SessionController) { SessionUser::destroy(); $url = $this->router->createUrl(array('controller' => 'backend.session', 'action' => 'index', 'query' => array('return' => $_SERVER['REQUEST_URI']))); if (!$this->isAjax()) { header('Location: ' . $url); } else { header('Content-type: text/javascript'); echo json_encode(array('__redirect' => $url)); } exit; } }
/** * Call the parent constructor * * @return void */ public function __construct() { parent::__construct(); $this->theme->setTheme(); // defaults $this->user = new User(); }
public function __construct() { $this->QuoteModel = new QuoteModel(); $this->VoteModel = new VoteModel(); $this->QuoteViewsModel = new QuoteViewsModel(); parent::__construct(); }
public function __construct($request, $response) {/*{{{*/ parent::__construct($request, $response); $hospitalId = $request->partnerConfig->hospitalId; $hospital = DAL::get()->find('hospital', $hospitalId); $response->hospital = $hospital; }/*}}}*/
public function __construct() { parent::__construct(); \View::composer('*', function ($view) { $view->with('angular_template_base_path', '/angular/templates?tmp='); }); }
public function __construct() { parent::__construct(); $this->forgetBeforeFilter('maintenance'); $this->theme = \Theme::type('admincp')->current(\ThemeManager::getActive('admincp'))->reBoot()->layout('layouts.default'); $this->activePage('dashboard'); }
/** * Initializer. * * @return void */ public function __construct() { // Apply the auth filter $this->beforeFilter('auth', array('except' => $this->whitelist)); // Call parent parent::__construct(); }