當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JModelList::loadFormData方法代碼示例

本文整理匯總了PHP中JModelList::loadFormData方法的典型用法代碼示例。如果您正苦於以下問題:PHP JModelList::loadFormData方法的具體用法?PHP JModelList::loadFormData怎麽用?PHP JModelList::loadFormData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在JModelList的用法示例。


在下文中一共展示了JModelList::loadFormData方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: loadFormData

 /**
  * Overrides the default function to check Date fields format, identified by
  * "_dateformat" suffix, and erases the field if it's not correct.
  */
 protected function loadFormData()
 {
     $app = JFactory::getApplication();
     $filters = $app->getUserState($this->context . '.filter', array());
     $error_dateformat = false;
     foreach ($filters as $key => $value) {
         if (strpos($key, '_dateformat') && !empty($value) && !$this->isValidDate($value)) {
             $filters[$key] = '';
             $error_dateformat = true;
         }
     }
     if ($error_dateformat) {
         $app->enqueueMessage(JText::_("COM_SOMOSMAESTROS_SEARCH_FILTER_DATE_FORMAT"), "warning");
         $app->setUserState($this->context . '.filter', $filters);
     }
     return parent::loadFormData();
 }
開發者ID:emeraldstudio,項目名稱:somosmaestros,代碼行數:21,代碼來源:informes.php

示例2: loadFormData

 /**
  * Method to get the data that should be injected in the form.
  *
  * @return	mixed	The data for the form.
  *
  * @since	3.5
  */
 protected function loadFormData()
 {
     $data = parent::loadFormData();
     // Set the selected filter values for pages that use the JLayouts for filtering
     $data->list['sortTable'] = $this->state->get('list.ordering');
     $data->list['directionTable'] = $this->state->get('list.direction');
     return $data;
 }
開發者ID:eshiol,項目名稱:joomla-cms,代碼行數:15,代碼來源:plugins.php


注:本文中的JModelList::loadFormData方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。