Exemplo n.º 1
0
 /**
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function execute()
 {
     if ($this->request->getPost()->count() !== 0) {
         return $this->executePost($this->request->getPost()->all());
     }
     $settings = $this->config->getSettings(Newsletter\Installer\Schema::MODULE_NAME);
     return ['html' => $this->formsHelper->yesNoCheckboxGenerator('html', $settings['html']), 'form' => array_merge($settings, $this->request->getPost()->all()), 'form_token' => $this->formTokenHelper->renderFormToken()];
 }
Exemplo n.º 2
0
 /**
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function execute()
 {
     if ($this->request->getPost()->count() !== 0) {
         return $this->executePost($this->request->getPost()->all());
     }
     $settings = $this->config->getSettings(Users\Installer\Schema::MODULE_NAME);
     return ['languages' => $this->formsHelpers->yesNoCheckboxGenerator('language_override', $settings['language_override']), 'registration' => $this->formsHelpers->yesNoCheckboxGenerator('enable_registration', $settings['enable_registration']), 'form' => array_merge(['mail' => $settings['mail']], $this->request->getPost()->all()), 'form_token' => $this->formTokenHelper->renderFormToken()];
 }
Exemplo n.º 3
0
 /**
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function execute()
 {
     $settings = $this->config->getSettings(Newsletter\Installer\Schema::MODULE_NAME);
     if ($this->request->getPost()->count() !== 0) {
         return $this->executePost($this->request->getPost()->all(), $settings);
     }
     $actions = [1 => $this->translator->t('newsletter', 'send_and_save'), 0 => $this->translator->t('newsletter', 'only_save')];
     return ['settings' => $settings, 'test' => $this->formsHelper->yesNoCheckboxGenerator('test', 0), 'action' => $this->formsHelper->checkboxGenerator('action', $actions, 1), 'form' => array_merge(['title' => '', 'text' => '', 'date' => ''], $this->request->getPost()->all()), 'form_token' => $this->formTokenHelper->renderFormToken()];
 }
Exemplo n.º 4
0
 /**
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function execute()
 {
     if ($this->request->getPost()->count() !== 0) {
         return $this->executePost($this->request->getPost()->all());
     }
     $seoSettings = $this->config->getSettings(Seo\Installer\Schema::MODULE_NAME);
     $robots = [1 => $this->translator->t('seo', 'robots_index_follow'), 2 => $this->translator->t('seo', 'robots_index_nofollow'), 3 => $this->translator->t('seo', 'robots_noindex_follow'), 4 => $this->translator->t('seo', 'robots_noindex_nofollow')];
     $sitemapSaveMode = [1 => $this->translator->t('seo', 'sitemap_save_mode_automatically'), 2 => $this->translator->t('seo', 'sitemap_save_mode_manually')];
     return ['robots' => $this->formsHelper->choicesGenerator('robots', $robots, $seoSettings['robots']), 'sitemap_is_enabled' => $this->formsHelper->yesNoCheckboxGenerator('sitemap_is_enabled', $seoSettings['sitemap_is_enabled']), 'sitemap_save_mode' => $this->formsHelper->checkboxGenerator('sitemap_save_mode', $sitemapSaveMode, $seoSettings['sitemap_save_mode']), 'form' => array_merge($seoSettings, $this->request->getPost()->all()), 'form_token' => $this->formTokenHelper->renderFormToken()];
 }
Exemplo n.º 5
0
 /**
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function execute()
 {
     if ($this->request->getPost()->count() !== 0) {
         return $this->executePost($this->request->getPost()->all());
     }
     $settings = $this->config->getSettings(News\Installer\Schema::MODULE_NAME);
     if ($this->modules->isActive('comments') === true) {
         $this->view->assign('allow_comments', $this->formsHelper->yesNoCheckboxGenerator('comments', $settings['comments']));
     }
     return ['dateformat' => $this->get('core.helpers.date')->dateFormatDropdown($settings['dateformat']), 'readmore' => $this->formsHelper->yesNoCheckboxGenerator('readmore', $settings['readmore']), 'readmore_chars' => $this->request->getPost()->get('readmore_chars', $settings['readmore_chars']), 'sidebar_entries' => $this->formsHelper->recordsPerPage((int) $settings['sidebar'], 1, 10, 'sidebar'), 'category_in_breadcrumb' => $this->formsHelper->yesNoCheckboxGenerator('category_in_breadcrumb', $settings['category_in_breadcrumb']), 'form_token' => $this->formTokenHelper->renderFormToken()];
 }
Exemplo n.º 6
0
 /**
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function execute()
 {
     if ($this->request->getPost()->count() !== 0) {
         return $this->executePost($this->request->getPost()->all());
     }
     $settings = $this->config->getSettings(Files\Installer\Schema::MODULE_NAME);
     if ($this->commentsHelpers) {
         $this->view->assign('comments', $this->formsHelper->yesNoCheckboxGenerator('comments', $settings['comments']));
     }
     return ['dateformat' => $this->get('core.helpers.date')->dateFormatDropdown($settings['dateformat']), 'sidebar_entries' => $this->formsHelper->recordsPerPage((int) $settings['sidebar'], 1, 10, 'sidebar'), 'form_token' => $this->formTokenHelper->renderFormToken()];
 }
Exemplo n.º 7
0
 /**
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function execute()
 {
     if ($this->request->getPost()->count() !== 0) {
         return $this->executePost($this->request->getPost()->all());
     }
     $settings = $this->config->getSettings(Comments\Installer\Schema::MODULE_NAME);
     // Emoticons erlauben
     if ($this->modules->isActive('emoticons') === true) {
         $this->view->assign('allow_emoticons', $this->formsHelper->yesNoCheckboxGenerator('emoticons', $settings['emoticons']));
     }
     return ['dateformat' => $this->get('core.helpers.date')->dateFormatDropdown($settings['dateformat']), 'form_token' => $this->formTokenHelper->renderFormToken()];
 }
Exemplo n.º 8
0
 /**
  * @param int $id
  *
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  * @throws \ACP3\Core\Controller\Exception\ResultNotExistsException
  */
 public function execute($id)
 {
     $guestbook = $this->guestbookModel->getOneById($id);
     if (empty($guestbook) === false) {
         $settings = $this->config->getSettings(Guestbook\Installer\Schema::MODULE_NAME);
         $this->title->setPageTitlePostfix($guestbook['name']);
         if ($this->request->getPost()->count() !== 0) {
             return $this->executePost($this->request->getPost()->all(), $settings, $id);
         }
         return ['form' => array_merge($guestbook, $this->request->getPost()->all()), 'form_token' => $this->formTokenHelper->renderFormToken(), 'can_use_emoticons' => $settings['emoticons'] == 1, 'activate' => $settings['notify'] == 2 ? $this->formsHelper->yesNoCheckboxGenerator('active', $guestbook['active']) : []];
     }
     throw new Core\Controller\Exception\ResultNotExistsException();
 }
Exemplo n.º 9
0
 /**
  * @param int $id
  *
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  * @throws \ACP3\Core\Controller\Exception\ResultNotExistsException
  */
 public function execute($id)
 {
     $newsletter = $this->newsletterModel->getOneById($id);
     if (empty($newsletter) === false) {
         $this->title->setPageTitlePostfix($newsletter['title']);
         $settings = $this->config->getSettings(Newsletter\Installer\Schema::MODULE_NAME);
         if ($this->request->getPost()->count() !== 0) {
             return $this->executePost($this->request->getPost()->all(), $newsletter, $settings, $id);
         }
         $actions = [1 => $this->translator->t('newsletter', 'send_and_save'), 0 => $this->translator->t('newsletter', 'only_save')];
         return ['settings' => array_merge($settings, ['html' => $newsletter['html']]), 'test' => $this->formsHelper->yesNoCheckboxGenerator('test', 0), 'action' => $this->formsHelper->checkboxGenerator('action', $actions, 1), 'form' => array_merge($newsletter, $this->request->getPost()->all()), 'form_token' => $this->formTokenHelper->renderFormToken()];
     }
     throw new Core\Controller\Exception\ResultNotExistsException();
 }
Exemplo n.º 10
0
 /**
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function execute()
 {
     if ($this->request->getPost()->count() !== 0) {
         return $this->executePost($this->request->getPost()->all());
     }
     $settings = $this->config->getSettings(Guestbook\Installer\Schema::MODULE_NAME);
     $notificationTypes = [0 => $this->translator->t('guestbook', 'no_notification'), 1 => $this->translator->t('guestbook', 'notify_on_new_entry'), 2 => $this->translator->t('guestbook', 'notify_and_enable')];
     if ($this->modules->isActive('emoticons') === true) {
         $this->view->assign('allow_emoticons', $this->formsHelper->yesNoCheckboxGenerator('emoticons', $settings['emoticons']));
     }
     if ($this->modules->isActive('newsletter') === true) {
         $this->view->assign('newsletter_integration', $this->formsHelper->yesNoCheckboxGenerator('newsletter_integration', $settings['newsletter_integration']));
     }
     return ['dateformat' => $this->get('core.helpers.date')->dateFormatDropdown($settings['dateformat']), 'notify' => $this->formsHelper->choicesGenerator('notify', $notificationTypes, $settings['notify']), 'overlay' => $this->formsHelper->yesNoCheckboxGenerator('overlay', $settings['overlay']), 'form' => array_merge(['notify_email' => $settings['notify_email']], $this->request->getPost()->all()), 'form_token' => $this->formTokenHelper->renderFormToken()];
 }
Exemplo n.º 11
0
 /**
  * @return array|\Symfony\Component\HttpFoundation\RedirectResponse
  */
 public function execute()
 {
     if ($this->request->getPost()->count() !== 0) {
         return $this->executePost($this->request->getPost()->all());
     }
     $systemSettings = $this->config->getSettings(System\Installer\Schema::MODULE_NAME);
     $pageCachePurgeMode = [1 => $this->translator->t('system', 'page_cache_purge_mode_automatically'), 2 => $this->translator->t('system', 'page_cache_purge_mode_manually')];
     $mailerTypes = ['mail' => $this->translator->t('system', 'mailer_type_php_mail'), 'smtp' => $this->translator->t('system', 'mailer_type_smtp')];
     $mailerSmtpSecurity = ['none' => $this->translator->t('system', 'mailer_smtp_security_none'), 'ssl' => $this->translator->t('system', 'mailer_smtp_security_ssl'), 'tls' => $this->translator->t('system', 'mailer_smtp_security_tls')];
     return ['entries' => $this->formsHelper->recordsPerPage($systemSettings['entries']), 'wysiwyg' => $this->fetchWysiwygEditors($systemSettings), 'languages' => $this->translator->getLanguagePack($systemSettings['lang']), 'mod_rewrite' => $this->formsHelper->yesNoCheckboxGenerator('mod_rewrite', $systemSettings['mod_rewrite']), 'time_zones' => $this->get('core.helpers.date')->getTimeZones($systemSettings['date_time_zone']), 'maintenance' => $this->formsHelper->yesNoCheckboxGenerator('maintenance_mode', $systemSettings['maintenance_mode']), 'page_cache' => $this->formsHelper->yesNoCheckboxGenerator('page_cache_is_enabled', $systemSettings['page_cache_is_enabled']), 'page_cache_purge_mode' => $this->formsHelper->checkboxGenerator('page_cache_purge_mode', $pageCachePurgeMode, $systemSettings['page_cache_purge_mode']), 'cache_images' => $this->formsHelper->yesNoCheckboxGenerator('cache_images', $systemSettings['cache_images']), 'mailer_type' => $this->formsHelper->choicesGenerator('mailer_type', $mailerTypes, $systemSettings['mailer_type']), 'mailer_smtp_auth' => $this->formsHelper->yesNoCheckboxGenerator('mailer_smtp_auth', $systemSettings['mailer_smtp_auth']), 'mailer_smtp_security' => $this->formsHelper->choicesGenerator('mailer_smtp_security', $mailerSmtpSecurity, $systemSettings['mailer_smtp_security']), 'form' => array_merge($systemSettings, $this->request->getPost()->all()), 'form_token' => $this->formTokenHelper->renderFormToken()];
 }
Exemplo n.º 12
0
 /**
  * @param int $blockId
  * @param int $parentId
  * @param int $leftId
  * @param int $rightId
  * @param int $displayMenuItem
  *
  * @return array
  */
 public function createMenuItemFormFields($blockId = 0, $parentId = 0, $leftId = 0, $rightId = 0, $displayMenuItem = 1)
 {
     return ['blocks' => $this->menusDropDown($blockId), 'display' => $this->formsHelper->yesNoCheckboxGenerator('display', $displayMenuItem), 'menuItems' => $this->menusHelper->menuItemsList($parentId, $leftId, $rightId)];
 }
Exemplo n.º 13
0
 /**
  * @param int $value
  *
  * @return array
  */
 protected function fetchIsSuperUser($value = 0)
 {
     return $this->formsHelpers->yesNoCheckboxGenerator('super_user', $value);
 }
Exemplo n.º 14
0
 /**
  * @param int $value
  *
  * @return array
  */
 protected function displayMail($value)
 {
     return $this->formsHelpers->yesNoCheckboxGenerator('mail_display', $value);
 }