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

Execute the action If a javascript file with the name of the module or action exists it will be loaded.
public execute ( )
Пример #1
0
 /**
  * Execute the extra
  *
  * @return void
  */
 public function execute()
 {
     // call parent
     parent::execute();
     // load template
     $this->loadTemplate();
 }
Пример #2
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->header->addCSS('/src/Frontend/Modules/' . $this->getModule() . '/Layout/Css/Blocks.css');
     $this->loadTemplate();
     $this->parse();
 }
Пример #3
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     // call parent
     parent::execute();
     $this->loadTemplate();
     $this->parse();
 }
Пример #4
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->header->addJS('/src/Frontend/Modules/' . $this->getModule() . '/Js/Frontpage.js');
     $this->loadTemplate();
     $this->parse();
 }
Пример #5
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->loadTemplate();
     $this->loadData();
     $this->parse();
 }
Пример #6
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->addJS('https://maps.googleapis.com/maps/api/js?sensor=false', true, false);
     $this->addJS('/src/Frontend/Modules/Addresses/Js/markerclusterer.js', true, false);
     $this->addJS('/src/Frontend/Modules/Addresses/Js/bootstrap.min.js', true, false);
     $this->addJS('/src/Frontend/Modules/Addresses/Js/bootstrap-multiselect.js', true, false);
     $this->addCSS('/src/Frontend/Modules/Addresses/Layout/Css/bootstrap-multiselect.css', true, false);
     $this->addCSS('/src/Frontend/Modules/Addresses/Layout/Css/Addresses.css', true, false);
     //--Get search
     $this->search = urldecode(\SpoonFilter::getGetValue("search", null, ""));
     if ($this->search != "") {
         $this->lat = urldecode(\SpoonFilter::getGetValue("lat", null, ""));
         $this->lng = urldecode(\SpoonFilter::getGetValue("lng", null, ""));
     }
     $this->addJSData('search', $this->search);
     $this->addJSData('lat', $this->lat);
     $this->addJSData('lng', $this->lng);
     /*        $this->searchTopGroups =(\SpoonFilter::getGetValue("groups", null, array(),'array'));
               $this ->searchGroups = (\SpoonFilter::getGetValue("topgroups", null, array(),'array'));*/
     $this->loadTemplate();
     $this->loadData();
     $this->loadForm();
     $this->parse();
 }
Пример #7
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->getTags();
     $this->getRelated();
     $this->loadTemplate();
     $this->parse();
 }
Пример #8
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     $this->addJS('https://maps.google.com/maps/api/js?sensor=true', true, false);
     parent::execute();
     $this->loadTemplate();
     $this->loadData();
     $this->parse();
 }
Пример #9
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->loadData();
     $template = $this->assignTemplate();
     $this->loadTemplate($template);
     $this->parse();
 }
Пример #10
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->loadTemplate();
     // Check if we're logged in, else redirect to the login form.
     if (!FrontendProfilesAuthentication::isLoggedIn()) {
         $queryString = $this->URL->getQueryString();
         throw new RedirectException('Redirect', new RedirectResponse(Navigation::getURLForBlock('Profiles', 'Login') . '?queryString=' . $queryString));
     }
 }
Пример #11
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->loadTemplate();
     if (!$this->get('fork.settings')->get('Faq', 'allow_own_question', false)) {
         return;
     }
     $this->loadForm();
     $this->validateForm();
     $this->parse();
 }
 /**
  * Execute the extra
  *
  * @return void
  */
 public function execute()
 {
     // call the parent
     parent::execute();
     // load template
     $this->loadTemplate();
     // load the data
     $this->getData();
     // parse
     $this->parse();
 }
Пример #13
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $contentBlock = $this->get('content_blocks.repository.content_block')->findOneByIdAndLocale((int) $this->data['id'], Locale::frontendLanguage());
     // if the content block is not found or if it is hidden, just return an array with empty text
     // @deprecated fix this for version 5, we just shouldn't assign this instead of this hack, but we need it for BC
     if (!$contentBlock instanceof ContentBlock || $contentBlock->isHidden()) {
         $contentBlock = ['text' => ''];
     }
     $this->tpl->assign('widgetContentBlocks', $contentBlock);
     // That's all folks!
 }
Пример #14
0
 /**
  * Exceute the action
  */
 public function execute()
 {
     parent::execute();
     //--Add css
     $this->header->addCSS('/src/Frontend/Modules/' . $this->getModule() . '/Layout/Css/Gallery.css');
     $this->header->addCSS('/src/Frontend/Modules/' . $this->getModule() . '/Layout/Css/colorbox.css');
     //--Add javascript
     $this->header->addJS('/src/Frontend/Modules/' . $this->getModule() . '/Js/Jquery.colorbox-min.js');
     $this->header->addJS('/src/Frontend/Modules/' . $this->getModule() . '/Js/Jquery.cycle.all.js');
     $this->loadTemplate();
     $this->loadData();
     $this->parse();
 }
Пример #15
0
 /**
  * Exceute the action
  */
 public function execute()
 {
     parent::execute();
     //--Add css
     $this->header->addCSS('/src/Frontend/Modules/' . $this->getModule() . '/Layout/Css/Gallery.css');
     //$this->header->addCSS('/src/Frontend/Modules/' . $this->getModule() . '/Layout/Css/Colorbox.css');
     //--Add javascript (No we won't, add these to your theme...)
     //$this->header->addJS('/src/Frontend/Modules/' . $this->getModule() . '/Js/Jquery.colorbox-min.js');
     //$this->header->addJS('/src/Frontend/Modules/' . $this->getModule() . '/Js/jquery.cycle2.min.js');
     //$this->header->addJS('/src/Frontend/Modules/' . $this->getModule() . '/Js/jquery.cycle2.center.min.js');
     $this->loadTemplate();
     $this->loadData();
     $this->parse();
 }
Пример #16
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     // define Google Maps API key
     $apikey = $this->get('fork.settings')->get('Core', 'google_maps_key');
     // check Google Maps API key, otherwise show error
     if ($apikey == null) {
         trigger_error('Please provide a Google Maps API key.');
     }
     $this->addJS('https://maps.googleapis.com/maps/api/js?key=' . $apikey, true, false);
     $this->addJS(FrontendLocationModel::getPathToMapStyles(false), true);
     parent::execute();
     $this->loadTemplate();
     $this->loadData();
     $this->parse();
 }
Пример #17
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->loadData();
     $widgetTemplatesPath = FRONTEND_MODULES_PATH . '/Pages/Layout/Widgets';
     // check if the given template exists
     try {
         $template = FrontendTheme::getPath($widgetTemplatesPath . '/' . $this->data['template']);
     } catch (FrontendException $e) {
         // template does not exist; assume subpages_default.tpl
         $template = FrontendTheme::getPath($widgetTemplatesPath . '/PreviousNextNavigation.tpl');
     }
     $this->loadTemplate($template);
     $this->parse();
 }
Пример #18
0
 /**
  * Execute the action
  * We will build the class name, require the class and call the execute method.
  */
 public function execute()
 {
     // build action-class-name
     $actionClass = 'Frontend\\Modules\\' . $this->getModule() . '\\Widgets\\' . $this->getAction();
     if ($this->getModule() == 'Core') {
         $actionClass = 'Frontend\\Core\\Widgets\\' . $this->getAction();
     }
     // validate if class exists (aka has correct name)
     if (!class_exists($actionClass)) {
         throw new FrontendException('The action file ' . $actionClass . ' could not be found.');
     }
     // create action-object
     $this->object = new $actionClass($this->getKernel(), $this->getModule(), $this->getAction(), $this->getData());
     // validate if the execute-method is callable
     if (!is_callable(array($this->object, 'execute'))) {
         throw new FrontendException('The action file should contain a callable method "execute".');
     }
     // call the execute method of the real action (defined in the module)
     $this->output = $this->object->execute();
 }
Пример #19
0
 /**
  * Execute the extra
  */
 public function execute()
 {
     parent::execute();
     $this->loadTemplate();
     $this->loadForm();
 }
Пример #20
0
 /**
  * Execute the extra.
  */
 public function execute()
 {
     parent::execute();
     $this->loadTemplate();
     $this->loadData();
     // success message
     if ($this->URL->hasParameter('identifier') && $this->URL->getParameter('identifier') == $this->item['identifier']) {
         $this->parseSuccessMessage();
     } else {
         // create/handle form
         $this->loadForm();
         $this->validateForm();
         $this->parse();
     }
     return $this->tpl->getContent(FRONTEND_MODULES_PATH . '/' . $this->getModule() . '/Layout/Widgets/' . $this->getAction() . '.tpl');
 }
Пример #21
0
 /**
  * Execute the extra.
  */
 public function execute()
 {
     parent::execute();
     $this->loadTemplate();
     $this->loadData();
     // success message
     if ($this->URL->hasParameter('identifier') && $this->URL->getParameter('identifier') == $this->item['identifier']) {
         $this->parseSuccessMessage();
     } else {
         // create/handle form
         $this->loadForm();
         $this->validateForm();
         $this->parse();
     }
 }