當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。