execute() публичный Метод

Execute the current action This method will be overwritten in most of the actions, but still be called to add general stuff
public execute ( )
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->loadDataGrid();
     $this->parse();
     $this->display();
 }
Пример #2
0
 /**
  * Execute the action.
  */
 public function execute()
 {
     parent::execute();
     $this->setFilter();
     $this->setItems();
     $this->createXML();
 }
Пример #3
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Пример #4
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->checkForDefaultGroups();
     $this->loadDataGrid();
     $this->parse();
     $this->display();
 }
Пример #5
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->header->addJS('highcharts.js', 'Core', false);
     $this->getData();
     $this->loadDataGrid();
     $this->parse();
     $this->display();
 }
Пример #6
0
 public function execute()
 {
     parent::execute();
     /* Set the initial date range */
     $this->dateRange = new DateRange();
     $this->handleDateRangeForm();
     $this->parse();
     $this->display();
 }
Пример #7
0
 /**
  * Execute the action.
  */
 public function execute()
 {
     parent::execute();
     $this->loadData();
     $this->loadDataGridInstalled();
     $this->loadDataGridInstallable();
     $this->parse();
     $this->display();
 }
Пример #8
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->isGod = BackendAuthentication::getUser()->isGod();
     $this->setFilter();
     $this->loadForm();
     $this->loadDataGrid();
     $this->parse();
     $this->display();
 }
Пример #9
0
 /**
  * Execute the action.
  */
 public function execute()
 {
     parent::execute();
     // load the data
     $this->loadData();
     // load the form
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
 /**
  * Execute the action
  *
  * @return  void
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // load the datagrids
     $this->loadDataGrids();
     // parse the datagrids
     $this->parse();
     // display the page
     $this->display();
 }
Пример #11
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // add js
     $this->header->addJS('http://maps.google.com/maps/api/js?sensor=false', null, false, true, false);
     $this->loadData();
     $this->loadDataGrid();
     $this->loadSettingsForm();
     $this->parse();
     $this->display();
 }
Пример #12
0
 public function execute()
 {
     parent::execute();
     $this->loadData();
     //		if($this->getParameter('load', 'string', null) == "ok")
     //		{
     //
     //		}
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Пример #13
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // get some data
     $modulesThatRequireAkismet = BackendExtensionsModel::getModulesThatRequireAkismet();
     $modulesThatRequireGoogleMaps = BackendExtensionsModel::getModulesThatRequireGoogleMaps();
     // set properties
     $this->needsAkismet = !empty($modulesThatRequireAkismet);
     $this->needsGoogleMaps = !empty($modulesThatRequireGoogleMaps);
     $this->loadForm();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Пример #14
0
 /**
  * Execute the action
  */
 public function execute()
 {
     // check if the user is really logged on
     if (BackendAuthentication::getUser()->isAuthenticated()) {
         $userEmail = BackendAuthentication::getUser()->getEmail();
         $this->getContainer()->get('logger')->info("User '{$userEmail}' is already authenticated.");
         $this->redirectToAllowedModuleAndAction();
     }
     parent::execute();
     $this->load();
     $this->validateForm();
     $this->parse();
     $this->display();
 }
Пример #15
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // add js
     $this->header->addJS('jstree/jquery.tree.js', null, false);
     $this->header->addJS('jstree/lib/jquery.cookie.js', null, false);
     $this->header->addJS('jstree/plugins/jquery.tree.cookie.js', null, false);
     // load the dgRecentlyEdited
     $this->loadDataGrids();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }
Пример #16
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // update the queued mailings with 'sent' status if their time has come already
     BackendMailmotorModel::updateQueuedMailings();
     // get the active campaign
     $this->getCampaign();
     // load datagrid
     $this->loadDataGrids();
     // parse page
     $this->parse();
     // display the page
     $this->display();
 }
Пример #17
0
 /**
  * Execute the action
  */
 public function execute()
 {
     $this->id = $this->getParameter('product_id', 'int');
     if ($this->id !== null && BackendCatalogModel::exists($this->id)) {
         parent::execute();
         $this->getData();
         $this->loadDataGridImages();
         $this->loadDataGridFiles();
         $this->loadDataGridVideos();
         $this->parse();
         $this->display();
     } else {
         $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
     }
 }
Пример #18
0
 public function execute()
 {
     // get parameters
     $this->id = $this->getParameter('id', 'int');
     if ($this->id !== null && BackendHotelsModel::exists('hotels', $this->id)) {
         parent::execute();
         $this->getData();
         $this->loadDatagrid();
         $this->parse();
         $this->display();
     } else {
         // no item found, throw an exception, because somebody is f*****g with our URL
         $this->redirect(BackendModel::createURLForAction('Index') . '&error=non-existing');
     }
 }
Пример #19
0
 /**
  * Execute the action.
  */
 public function execute()
 {
     parent::execute();
     $this->loadData();
     if ($this->getParameter('module') !== NULL) {
         $module = $this->getParameter('module');
         $files = array();
         // frontend files
         $frontendDir = FRONTEND_PATH . "/Modules/" . $module . "/";
         // check if dir exist
         if (file_exists($frontendDir)) {
             $dir = new \RecursiveDirectoryIterator($frontendDir);
             foreach (new \RecursiveIteratorIterator($dir) as $filename => $file) {
                 $files[] = str_replace(PATH_WWW . '/', '', $filename);
             }
         }
         // backend files
         $backendDir = BACKEND_PATH . "/Modules/" . $module . "/";
         // check if dir exist
         if (file_exists($backendDir)) {
             $dir = new \RecursiveDirectoryIterator($backendDir);
             foreach (new \RecursiveIteratorIterator($dir) as $filename => $file) {
                 $files[] = str_replace(PATH_WWW . '/', '', $filename);
             }
         }
         // we found some files
         if (!empty($files)) {
             // create zip
             if (BackendModuleMakerHelper::createZip($files, PATH_WWW . '/' . $module . '.zip')) {
                 // download zip
                 header('Content-Type: application/zip');
                 header('Content-disposition: attachment; filename=' . $module . '.zip');
                 header('Content-Length: ' . filesize(PATH_WWW . '/' . $module . '.zip'));
                 readfile(PATH_WWW . '/' . $module . '.zip');
                 // delete temp file
                 \Spoonfile::delete(PATH_WWW . '/' . $module . '.zip');
                 exit;
             }
         } else {
             $this->redirect(Model::createURLForAction('create_zip') . '&error=non-existing');
         }
     } else {
         $this->loadDataGridInstalled();
         $this->loadDataGridInstallable();
         $this->parse();
         $this->display();
     }
 }
Пример #20
0
 public function execute()
 {
     parent::execute();
     $settingsForm = new SettingsType('settings', $this->get('fork.settings'), $this->get('analytics.google_analytics_service'));
     if ($settingsForm->handle()) {
         $this->redirect(Model::createURLForAction('Settings'));
     }
     $settingsForm->parse($this->tpl);
     if ($this->get('fork.settings')->get($this->getModule(), 'web_property_id')) {
         $this->tpl->assign('web_property_id', $this->get('fork.settings')->get($this->getModule(), 'web_property_id'));
     }
     if ($this->get('fork.settings')->get($this->getModule(), 'profile')) {
         $this->tpl->assign('profile', $this->get('fork.settings')->get($this->getModule(), 'profile'));
     }
     $this->display();
 }
Пример #21
0
 /**
  * Execute the action
  */
 public function execute()
 {
     // get parameters
     $this->id = $this->getParameter('id', 'int');
     // does the item exist
     if ($this->id !== null && BackendFormBuilderModel::existsData($this->id)) {
         parent::execute();
         $this->setFilter();
         $this->getData();
         $this->parse();
         $this->display();
     } else {
         // no item found, redirect with an error, because somebody is f*****g with our url
         $this->redirect(BackendModel::createURLForAction('Index') . '&error=non-existing');
     }
 }
Пример #22
0
 /**
  * Execute the action.
  */
 public function execute()
 {
     // get parameters
     $this->currentTheme = $this->getParameter('theme', 'string');
     // does the item exist
     if ($this->currentTheme !== null && BackendExtensionsModel::existsTheme($this->currentTheme)) {
         parent::execute();
         $this->loadData();
         $this->loadDataGridTemplates();
         $this->parse();
         $this->display();
     } else {
         // no item found, redirect to index, because somebody is f*****g with our url
         $this->redirect(BackendModel::createURLForAction('Themes') . '&error=non-existing');
     }
 }
Пример #23
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // add js
     $this->header->addJS('jstree/jquery.tree.js', null, false);
     $this->header->addJS('jstree/lib/jquery.cookie.js', null, false);
     $this->header->addJS('jstree/plugins/jquery.tree.cookie.js', null, false);
     // add css
     $this->header->addCSS('/src/Backend/Modules/Pages/Js/jstree/themes/fork/style.css', null, true);
     // load the dgRecentlyEdited
     $this->loadDataGrids();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }
Пример #24
0
 /**
  * Execute the action
  */
 public function execute()
 {
     $this->header->addJS(FrontendLocationModel::getPathToMapStyles());
     parent::execute();
     // define Google Maps API key
     $apikey = $this->get('fork.settings')->get('Core', 'google_maps_key');
     // check Google Maps API key, otherwise redirect to settings
     if ($apikey === null) {
         $this->redirect(BackendModel::createURLForAction('Index', 'Settings'));
     }
     // add js
     $this->header->addJS('https://maps.googleapis.com/maps/api/js?key=' . $apikey, null, false, true, false);
     $this->loadData();
     $this->loadDataGrid();
     $this->loadSettingsForm();
     $this->parse();
     $this->display();
 }
Пример #25
0
 /**
  * Execute
  */
 public function execute()
 {
     parent::execute();
     $form = $this->createForm($this->get('mailmotor.form.settings'), new SaveSettings($this->get('fork.settings')));
     $form->handleRequest($this->get('request'));
     if (!$form->isValid()) {
         $this->tpl->assign('form', $form->createView());
         $this->parse();
         $this->display();
         return;
     }
     /** @var SaveSettings $settings */
     $settings = $form->getData();
     // The command bus will handle the saving of the settings in the database.
     $this->get('command_bus')->handle($settings);
     $this->get('event_dispatcher')->dispatch(SettingsSavedEvent::EVENT_NAME, new SettingsSavedEvent($settings));
     return $this->redirect(Model::createURLForAction('Settings', null, null, ['report' => 'saved']));
 }
Пример #26
0
 /**
  * Execute the action
  */
 public function execute()
 {
     // call parent, this will probably add some general CSS/JS or other required files
     parent::execute();
     // get parameters
     $this->from = $this->getParameter('from');
     $this->to = $this->getParameter('to');
     // validate
     if ($this->from == '') {
         throw new BackendException('Specify a from-parameter.');
     }
     if ($this->to == '') {
         throw new BackendException('Specify a to-parameter.');
     }
     // copy pages
     BackendPagesModel::copy($this->from, $this->to);
     // redirect
     $this->redirect(BackendModel::createURLForAction('Index') . '&report=copy-added&var=' . urlencode($this->to));
 }
Пример #27
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     $this->categoryId = \SpoonFilter::getGetValue('category', null, null, 'int');
     if ($this->categoryId == 0) {
         $this->categoryId = null;
     } else {
         // get category
         $this->category = BackendCatalogModel::getCategory($this->categoryId);
         // reset
         if (empty($this->category)) {
             // reset GET to trick Spoon
             $_GET['category'] = null;
             // reset
             $this->categoryId = null;
         }
     }
     $this->loadDataGrid();
     $this->parse();
     $this->display();
 }
Пример #28
0
 /**
  * Execute the action.
  */
 public function execute()
 {
     // get parameters
     $this->currentModule = $this->getParameter('module', 'string');
     // does the item exist
     if ($this->currentModule !== null && BackendExtensionsModel::existsModule($this->currentModule)) {
         // call parent, this will probably add some general CSS/JS or other required files
         parent::execute();
         // make sure this module can be installed
         $this->validateInstall();
         // do the actual install
         BackendExtensionsModel::installModule($this->currentModule);
         // remove our container cache after this request
         $filesystem = new Filesystem();
         $filesystem->remove($this->getContainer()->getParameter('kernel.cache_dir'));
         // redirect to index with a success message
         $this->redirect(BackendModel::createURLForAction('Modules') . '&report=module-installed&var=' . $this->currentModule . '&highlight=row-module_' . $this->currentModule);
     } else {
         // no item found, redirect to index, because somebody is f*****g with our url
         $this->redirect(BackendModel::createURLForAction('Modules') . '&error=non-existing');
     }
 }
Пример #29
0
 /**
  * Execute the action.
  */
 public function execute()
 {
     // get parameters
     $this->currentModule = $this->getParameter('module', 'string');
     // does the item exist
     if ($this->currentModule !== null && BackendExtensionsModel::existsModule($this->currentModule)) {
         // call parent, this will probably add some general CSS/JS or other required files
         parent::execute();
         // load data
         $this->loadData();
         // load datagrids
         $this->loadDataGridCronjobs();
         $this->loadDataGridEvents();
         // parse
         $this->parse();
         // display the page
         $this->display();
     } else {
         // no item found, redirect to index, because somebody is f*****g with our url
         $this->redirect(BackendModel::createURLForAction('Modules') . '&error=non-existing');
     }
 }
Пример #30
0
 /**
  * Execute the action
  */
 public function execute()
 {
     parent::execute();
     // add js
     $this->header->addJS('jstree/jquery.tree.js', null, false);
     $this->header->addJS('jstree/lib/jquery.cookie.js', null, false);
     $this->header->addJS('jstree/plugins/jquery.tree.cookie.js', null, false);
     // add css
     $this->header->addCSS('/src/Backend/Modules/Pages/Js/jstree/themes/fork/style.css', null, true);
     // check if the cached files exists
     if (!is_file(PATH_WWW . '/src/Frontend/Cache/Navigation/keys_' . BL::getWorkingLanguage() . '.php')) {
         BackendPagesModel::buildCache(BL::getWorkingLanguage());
     }
     if (!is_file(PATH_WWW . '/src/Frontend/Cache/Navigation/navigation_' . BL::getWorkingLanguage() . '.php')) {
         BackendPagesModel::buildCache(BL::getWorkingLanguage());
     }
     // load the dgRecentlyEdited
     $this->loadDataGrids();
     // parse
     $this->parse();
     // display the page
     $this->display();
 }