Ejemplo n.º 1
0
 /**
  * Displays the form
  *
  * @param   bool  $cachable   - Is it cachable
  * @param   bool  $urlparams  - The url params
  *
  * @return JControllerLegacy|void
  */
 public function display($cachable = false, $urlparams = false)
 {
     MatukioHelperUtilsBasic::loginUser();
     $document = JFactory::getDocument();
     $viewName = JFactory::getApplication()->input->get('view', 'event');
     $viewType = $document->getType();
     $view = $this->getView($viewName, $viewType);
     $model = $this->getModel('Event', 'MatukioModel');
     $view->setModel($model, true);
     $tmpl = MatukioHelperSettings::getSettings("event_template", "default");
     $params = JComponentHelper::getParams('com_matukio');
     $menuitemid = JFactory::getApplication()->input->getInt('Itemid');
     if ($menuitemid) {
         $site = new JSite();
         $menu = $site->getMenu();
         $menuparams = $menu->getParams($menuitemid);
         $params->merge($menuparams);
     }
     $ptmpl = $params->get('event_template', '');
     if (!empty($ptmpl)) {
         $tmpl = $ptmpl;
     }
     $view->setLayout($tmpl);
     $view->display();
 }
Ejemplo n.º 2
0
 /**
  * Displays the form
  *
  * @param   bool  $cachable   - Is it cachable
  * @param   bool  $urlparams  - The url params
  *
  * @deprecated  Used for old links - should be moved some time
  * @return JControllerLegacy|void
  */
 public function display($cachable = false, $urlparams = false)
 {
     $task = JFactory::getApplication()->input->get('task', '');
     if (empty($task)) {
         MatukioHelperUtilsBasic::loginUser();
         $link = JRoute::_("index.php?option=com_matukio&view=eventlist");
         $this->setRedirect($link);
     }
 }
Ejemplo n.º 3
0
 /**
  * Displays the payment form
  *
  * @param   bool  $cachable   - Is the site cachable (we ignore that)
  * @param   bool  $urlparams  - The url params
  *
  * @return JControllerLegacy|void
  */
 public function display($cachable = false, $urlparams = false)
 {
     MatukioHelperUtilsBasic::loginUser();
     $document = JFactory::getDocument();
     $viewName = JFactory::getApplication()->input->get('view', 'PaymentForm');
     $viewType = $document->getType();
     $view = $this->getView($viewName, $viewType);
     $model = $this->getModel('PaymentForm', 'MatukioModel');
     $view->setModel($model, true);
     $view->display();
 }