当前位置: 首页>>代码示例>>PHP>>正文


PHP JControllerForm::save方法代码示例

本文整理汇总了PHP中JControllerForm::save方法的典型用法代码示例。如果您正苦于以下问题:PHP JControllerForm::save方法的具体用法?PHP JControllerForm::save怎么用?PHP JControllerForm::save使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JControllerForm的用法示例。


在下文中一共展示了JControllerForm::save方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

 /**
  * Save the configuration
  *
  * @return void
  * @since 1.0
  */
 function save()
 {
     $jform = JRequest::getVar('jform', array(), 'post', 'array');
     $iid = $jform['series_id'];
     $aid = $jform['automailing_id'];
     $msg = false;
     if (isset($jform['time_start']) && empty($jform['time_start'])) {
         $err = true;
         $msg = JText::_("COM_NEWSLETTER_START_TIME_IS_EMPTY");
     }
     //		if (isset($jform['time_offset']) && empty($jform['time_offset'])) {
     //			$err = true;
     //			$msg = JText::_("COM_NEWSLETTER_TIME_OFFSET_IS_EMPTY");
     //		}
     if (empty($err) && parent::save()) {
         // Set the redirect based on the task.
         switch ($this->getTask()) {
             case 'save':
                 $this->setRedirect(JRoute::_('index.php?option=com_newsletter&view=close&tmpl=component', false));
                 break;
         }
         return true;
     }
     $this->setRedirect(JRoute::_('index.php?option=com_newsletter&tmpl=component&view=' . $this->view_item . $this->getRedirectToItemAppend($iid, 'series_id') . '&automailing_id=' . $aid, false), $msg);
     return false;
 }
开发者ID:Rikisha,项目名称:proj,代码行数:32,代码来源:automailingitem.php

示例2: execute

 public function execute($task = null)
 {
     $app = JFactory::getApplication();
     $modelName = $app->input->get('model', 'Calendar');
     // Required objects
     $input = JFactory::getApplication()->input;
     // Get the form data
     $this->formData = new JRegistry($input->get('jform', '', 'array'));
     //Get model class
     $this->model = $this->getModel($modelName);
     if ($task == 'deleteListDaytime') {
         $this->deleteListDaytime();
     } elseif ($task == 'cancel') {
         $this->cancel();
     } else {
         if ($task == 'apply') {
             parent::save();
             $app->enqueueMessage('Calendrier sauvé avec succès!');
             $app->redirect($_SERVER['HTTP_REFERER']);
         } else {
             if ($task == 'save') {
                 parent::save();
             } else {
                 $this->edit();
             }
         }
     }
 }
开发者ID:gorgozilla,项目名称:Estivole,代码行数:28,代码来源:calendar.php

示例3: save

 public function save($key = NULL, $urlVar = NULL)
 {
     if (!parent::save($key = NULL, $urlVar = NULL)) {
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', JText::_('COM_HTRAININGLOGS_PORTLET_EXISTS')));
         $this->setMessage($this->getError(), 'error');
     }
 }
开发者ID:hogeh,项目名称:htraininglogs2,代码行数:7,代码来源:downtime.php

示例4: save

 public function save($key = null, $urlVar = null)
 {
     $data = $this->input->post->get('jform', array(), 'array');
     $model = $this->getModel();
     $table = $model->getTable();
     $url = $table->getKeyName();
     parent::save($key = $data['id'], $urlVar = $url);
 }
开发者ID:pupsikus,项目名称:bs.test,代码行数:8,代码来源:form.php

示例5: save

 /**
  * Save a template field
  *
  * @copyright
  * @author 		RolanD
  * @todo
  * @see
  * @access 		public
  * @param
  * @return
  * @since 		4.3
  */
 public function save($key = null, $urlVar = null)
 {
     if (parent::save($key, $urlVar)) {
         $this->setRedirect('');
         JFactory::getDocument()->addScriptDeclaration('window.parent.location.href = window.parent.location.href;');
         JFactory::getDocument()->addScriptDeclaration('window.parent.SqueezeBox.close();');
     }
 }
开发者ID:alesconti,项目名称:FF_2015,代码行数:20,代码来源:templatefield.php

示例6: save

 public function save()
 {
     if (parent::save()) {
         $msg = JText::_('SL_SAVED');
     } else {
         $msg = JText::_('SL_ERROR_SAVE');
     }
     $this->setRedirect('index.php?option=com_slp&controller=slpedit', $msg);
 }
开发者ID:neoandrew1000,项目名称:crao_journal,代码行数:9,代码来源:slpedit.php

示例7: save

 public function save($key = null, $urlVar = null)
 {
     parent::save($key = null, $urlVar = null);
     // $this->input = $this->input->post->get('ziak_id', 0, 'int');
     // echo $this->input;
     $this->input = JFactory::getApplication()->input->getInt('trieda_id', 0);
     $this->setRedirect(JRoute::_('index.php?option=com_absolventi&view=ziacilist&trieda_id=' . $this->input, false));
     $this->redirect;
 }
开发者ID:vladorf,项目名称:absolventi,代码行数:9,代码来源:ziaciform.php

示例8: save

 public function save($key = NULL, $urlVar = NULL)
 {
     //print_r($_POST);exit;
     if (!parent::save($key = NULL, $urlVar = NULL)) {
         //$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_SAVE_FAILED', JText::_('COM_HTRAININGLOGS_RECORDEXISTS')));
         $this->setMessage($this->getError(), 'error');
     }
     $this->setRedirect(JRoute::_('index.php?option=com_htraininglogs&view=sessions', false));
 }
开发者ID:hogeh,项目名称:htraininglogs2,代码行数:9,代码来源:cfgsetting.php

示例9: save

 public function save($key = null, $urlVar = 'a_id')
 {
     $result = parent::save($key, $urlVar);
     // If ok, redirect to the return page.
     if ($result) {
         $this->setRedirect($this->getReturnPage());
     }
     return $result;
 }
开发者ID:jasonrgd,项目名称:Digital-Publishing-Platform-Joomla,代码行数:9,代码来源:author.php

示例10: save

 function save($key = NULL, $urlVar = NULL)
 {
     parent::save();
     if (JRequest::getVar('fc_doajax_submit')) {
         JFactory::getApplication()->enqueueMessage(JText::_('FLEXI_ITEM_SAVED'), 'message');
         echo flexicontent_html::get_system_messages_html();
         exit;
         // Ajax submit, do not rerender the view
     }
 }
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:10,代码来源:category.php

示例11: save

 function save($key = null, $urlVar = null)
 {
     if (parent::save($key = null, $urlVar = null)) {
         $post = JFactory::getApplication()->input->getArray($_POST);
         if ($post['config_currency_auto']) {
             $model = $this->getModel('currencies');
             $model->updateCurrencies(true);
         }
     }
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:10,代码来源:storeprofile.php

示例12: save

 /**
  * Method to save a record.
  *
  * @param   string  $key     The name of the primary key of the URL variable.
  * @param   string  $urlVar  The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
  *
  * @return  boolean  True if successful, false otherwise.
  *
  * @since   11.1
  */
 public function save($key = null, $urlVar = null)
 {
     $app = JFactory::getApplication();
     $brb = $app->input->post->get('brb');
     if ($brb) {
         self::save2($key, $urlVar, $brb);
     } else {
         return parent::save($key, $urlVar);
     }
 }
开发者ID:densem-2013,项目名称:exikom,代码行数:20,代码来源:controllerform.php

示例13: save

 /**
  * Overrides parent save method to check the submitted passwords match.
  *
  * @param   string  $key     The name of the primary key of the URL variable.
  * @param   string  $urlVar  The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
  *
  * @return  boolean  True if successful, false otherwise.
  *
  * @since   3.2
  */
 public function save($key = null, $urlVar = null)
 {
     $this->setRedirect(JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id=' . JFactory::getUser()->id, false));
     $return = parent::save();
     if ($this->getTask() != 'apply') {
         // Redirect to the main page.
         $this->setRedirect(JRoute::_('index.php', false));
     }
     return $return;
 }
开发者ID:grlf,项目名称:eyedock,代码行数:20,代码来源:profile.php

示例14: save

 /**
  * Method to save a record.
  *
  * @param     string     $key        The name of the primary key of the URL variable.
  * @param     string     $url_var    The name of the URL variable if different from the primary key.
  *
  * @return    boolean                True if successful, false otherwise.
  */
 public function save($key = null, $url_var = 'id')
 {
     $result = parent::save($key, $url_var);
     $project = JRequest::getUint('filter_project', 0);
     $parent = JRequest::getUint('filter_parent_id', 0);
     // If ok, redirect to the return page.
     if ($result) {
         $this->setRedirect($this->getReturnPage($parent, $project));
     }
     return $result;
 }
开发者ID:gagnonjeanfrancois,项目名称:Projectfork,代码行数:19,代码来源:noteform.php

示例15: save

 function save($key = null, $urlVar = null)
 {
     if (parent::save($key, $urlVar)) {
         require_once JPATH_SITE . '/components/com_j2store/helpers/cart.php';
         $storeprofile = J2StoreHelperCart::getStoreAddress();
         if ($storeprofile->config_currency_auto) {
             $model = $this->getModel('currencies');
             $model->updateCurrencies(true);
         }
     }
 }
开发者ID:ForAEdesWeb,项目名称:AEW4,代码行数:11,代码来源:currency.php


注:本文中的JControllerForm::save方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。