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


PHP JControllerForm::edit方法代码示例

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


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

示例1: edit

 /**
  * Edit document.
  */
 public function edit($key = null, $urlVar = null)
 {
     if (JFactory::getApplication()->isSite()) {
         JRequest::setVar('id', $this->getModel()->searchIdByPath(JoomDOCRequest::getPath()), 'post');
     }
     parent::edit();
 }
开发者ID:abdullah929,项目名称:bulletin,代码行数:10,代码来源:controllerform.php

示例2: q1edit

 /**
  * Method to edit an existing 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 access level check and checkout passes, false otherwise.
  */
 public function q1edit($key = null, $urlVar = 'sub_id')
 {
     $result = false;
     $Itemid = JRequest::getInt('Itemid');
     $result = parent::edit($key, $urlVar);
     $this->getModel()->checkIn(JRequest::getInt($urlVar));
     return $result;
 }
开发者ID:hogeh,项目名称:htraininglogs,代码行数:16,代码来源:fitnessrec.php

示例3: edit

 public function edit($key = null, $urlVar = 'sub_id')
 {
     $result = parent::edit($key, $urlVar);
     if (!$result) {
         //	$this->setRedirect($this->getReturnPage());
     }
     return $result;
 }
开发者ID:hogeh,项目名称:htraininglogs2,代码行数:8,代码来源:session.php

示例4: edit

 function edit($key = NULL, $urlVar = NULL)
 {
     $cid = JRequest::getVar('cid', array(), 'get', 'array');
     if (count($cid)) {
         JRequest::setVar('cid', $cid, 'post', 'array');
     }
     parent::edit();
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:category.php

示例5: edit

 public function edit($key = null, $urlVar = null)
 {
     $canDo = JvrelativesHelper::getActions();
     if (!$canDo->get('core.admin')) {
         $this->setMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_jvrelatives&view=jvrelatives', false));
         return false;
     }
     return parent::edit($key, $urlVar);
 }
开发者ID:site4com,项目名称:prometheus,代码行数:10,代码来源:config.php

示例6: edit

 public function edit($key = null, $urlVar = null)
 {
     $app = JFactory::getApplication();
     $result = parent::edit();
     if ($result) {
         $app->setUserState('com_heartcare.edit.waves.type', null);
         $app->setUserState('com_heartcare.edit.waves.link', null);
     }
     return $result;
 }
开发者ID:bobozhangshao,项目名称:admin-com_heartcare,代码行数:10,代码来源:waves.php

示例7: edit

 /**
  * Extend parent edit to check if the new image has a item defined
  */
 public function edit($key = null, $urlVar = null)
 {
     // check item
     $id = JRequest::getInt('id', 0);
     $filters = JFactory::getApplication()->getUserState('com_jkit.images.filter');
     $item = $filters['item'];
     if (!$id && !$item) {
         $this->setRedirect(JRoute::_('index.php?option=com_jkit&view=images', false), JText::_('COM_JKIT_IMAGE_SELECT_ITEM'), 'notice');
         return;
     }
     parent::edit($key = null, $urlVar = null);
 }
开发者ID:CloudHotelier,项目名称:com_jkit,代码行数:15,代码来源:image.php

示例8: edit

 /**
  * Method to edit an existing menu item.
  *
  * @return	void
  * @since	1.6
  */
 public function edit($key = null, $urlVar = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     $result = parent::edit();
     if ($result) {
         // Push the new ancillary data into the session.
         $app->setUserState('com_menus.edit.adminitem.type', null);
         $app->setUserState('com_menus.edit.adminitem.link', null);
     }
     return true;
 }
开发者ID:rdeutz,项目名称:square-one-cms,代码行数:18,代码来源:adminitem.php

示例9: edit

 /**
  * Extend parent edit to check if the new room has a hotel defined
  */
 public function edit($key = null, $urlVar = null)
 {
     // check hotel
     $id = JRequest::getInt('id', 0);
     $filters = JFactory::getApplication()->getUserState('com_chpanel.rooms.filter');
     $hotel = $filters['hotel'];
     if (!$id && !$hotel) {
         $this->setRedirect(JRoute::_('index.php?option=com_chpanel&view=rooms', false), JText::_('COM_CHPANEL_ANY_ERROR_SELECT_HOTEL'), 'notice');
         return;
     }
     parent::edit($key = null, $urlVar = null);
 }
开发者ID:moijafcor,项目名称:CHPanel-Lite,代码行数:15,代码来源:room.php

示例10: editRatePrices

 public function editRatePrices($key = null, $urlVar = null)
 {
     // Initialise variables.
     $app = JFactory::getApplication();
     $result = parent::edit();
     $recordId = JRequest::getInt('room_id');
     $rateId = JRequest::getInt('rate_id');
     // Save the data in the session.
     $app->setUserState('com_jhotelreservation.edit.room.roomid', $recordId);
     // Redirect back to the edit screen.
     $this->setRedirect(JRoute::_('index.php?option=' . $this->option . '&view=roomrateprices&layout=edit&rate_id=' . $rateId, false));
     return true;
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:13,代码来源:room.php

示例11: edit

 public function edit($key = null, $url_var = null)
 {
     if (!JSession::checkToken('get') and !JSession::checkToken('post')) {
         jexit(JText::_('JINVALID_TOKEN'));
     }
     $rights = AimySitemapRightsHelper::getRights();
     if (!$rights->get('core.edit')) {
         $this->setError(JText::_('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED'));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_aimysitemap&view=urls', false));
         return false;
     }
     return parent::edit($key, $url_var);
 }
开发者ID:ejailesb,项目名称:repo_empr,代码行数:14,代码来源:url.php

示例12: edit

 public function edit($key = null, $urlVar = null)
 {
     $app = JFactory::getApplication();
     $cid = $app->input->get('cid', array(), 'array');
     $recordId = count($cid) ? $cid[0] : 0;
     $parts = explode(',', $recordId);
     if (count($parts) == 2) {
         $cid = $parts[1];
         $user_id = $parts[0];
         $app->input->set('user_id', $user_id);
         $app->input->set('cid', array($cid));
         $app->input->post->set('cid', array($cid));
         $app->input->set('cid', array($cid));
         @JRequest::setVar('cid', array($cid), 'post');
         @JRequest::setVar('user_id', $user_id, 'post');
         if (!$cid) {
             return $this->add();
         }
     }
     return parent::edit($key, $urlVar);
 }
开发者ID:ForAEdesWeb,项目名称:AEW3,代码行数:21,代码来源:customer.php

示例13: edit

 /**
  * Method to edit an existing 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).
  *
  * @since   3.1
  *
  * @return  boolean  True if access level check and checkout passes, false otherwise.
  */
 public function edit($key = null, $urlVar = null)
 {
     $this->option = 'com_fabrik';
     return parent::edit($key, $urlVar);
 }
开发者ID:ppantilla,项目名称:bbninja,代码行数:16,代码来源:fabcontrollerform.php

示例14: edit

 public function edit($key = null, $urlVar = null)
 {
     $model = $this->getModel();
     $table = $model->getTable();
     $cid = $this->input->post->get('cid', array(), 'array');
     $context = "{$this->option}.edit.{$this->context}";
     // Determine the name of the primary key for the data.
     if (empty($key)) {
         $key = $table->getKeyName();
     }
     // To avoid data collisions the urlVar may be different from the primary key.
     if (empty($urlVar)) {
         $urlVar = $key;
     }
     // Get the previous record id (if any) and the current record id.
     $recordId = (int) (count($cid) ? $cid[0] : $this->input->getInt($urlVar));
     $app = JFactory::getApplication('administration');
     $app->setUserState('message.id', (int) $recordId);
     parent::edit($key, $urlVar);
 }
开发者ID:konstantinosDMS,项目名称:jNotification,代码行数:20,代码来源:notification.php

示例15: edit

 public function edit($key = 'id', $urlVar = 'id')
 {
     if (!$this->allowEdit(null, 'id')) {
         $this->setError(JText::_('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED'));
         $this->setMessage($this->getError(), 'error');
         $return = 'index.php?option=com_smfaq&task=edit.edit&id=' . JRequest::getInt('id') . '&catid=' . JRequest::getInt('catid');
         $this->setRedirect(JRoute::_('index.php?option=com_users&task=login&return=' . base64_encode($return)));
         return false;
     }
     parent::edit($key, $urlVar);
 }
开发者ID:ASDAFF,项目名称:smfaq,代码行数:11,代码来源:edit.php


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