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


PHP JModelForm::preprocessForm方法代码示例

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


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

示例1: preprocessForm

 protected function preprocessForm(JForm $form, $data, $group = 'contact')
 {
     $userParams = JComponentHelper::getParams('com_contact');
     // Deal with captcha
     $captcha = $userParams->get('captcha', '0');
     if ($captcha === '0') {
         $form->removeField('captcha');
     } else {
         $form->setFieldAttribute('captcha', 'plugin', $captcha);
     }
     parent::preprocessForm($form, $data, 'user');
 }
开发者ID:ngxuanmui,项目名称:hanhphuc.vn,代码行数:12,代码来源:contact.php

示例2: preprocessForm

 /**
  * Override JModelAdmin::preprocessForm to ensure the correct plugin group is loaded.
  *
  * @param   JForm   $form   A JForm object.
  * @param   mixed   $data   The data expected for the form.
  * @param   string  $group  The name of the plugin group to import (defaults to "content").
  *
  * @return  void
  *
  * @since   1.6
  * @throws  Exception if there is an error in the form event.
  */
 protected function preprocessForm(JForm $form, $data, $group = 'user')
 {
     parent::preprocessForm($form, $data, $group);
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:16,代码来源:login.php

示例3: preprocessForm

 /**
  * Override preprocessForm to load the user plugin group instead of content.
  *
  * @param	object	A form object.
  * @param	mixed	The data expected for the form.
  * @throws	Exception if there is an error in the form event.
  * @since	1.6
  */
 protected function preprocessForm(JForm $form, $data, $group = 'user')
 {
     if (JComponentHelper::getParams('com_users')->get('frontend_userparams')) {
         $form->loadFile('frontend', false);
         if (JFactory::getUser()->authorise('core.login.admin')) {
             $form->loadFile('frontend_admin', false);
         }
     }
     parent::preprocessForm($form, $data, $group);
 }
开发者ID:exntu,项目名称:joomla-cms,代码行数:18,代码来源:profile.php

示例4: preprocessForm

 /**
  * Override preprocessForm to load the user plugin group instead of content.
  *
  * @param   object	A form object.
  * @param   mixed	The data expected for the form.
  * @throws	Exception if there is an error in the form event.
  * @since   1.6
  */
 protected function preprocessForm(JForm $form, $data, $group = 'user')
 {
     $userParams = JComponentHelper::getParams('com_users');
     //Add the choice for site language at registration time
     if ($userParams->get('site_language') == 1 && $userParams->get('frontend_userparams') == 1) {
         $form->loadFile('sitelang', false);
     }
     parent::preprocessForm($form, $data, $group);
 }
开发者ID:interfaceslivres,项目名称:ccmd-ufpb,代码行数:17,代码来源:registration.php

示例5: preprocessForm

 /**
  * Override preprocessForm to load the user plugin group instead of content.
  *
  * @param	object	A form object.
  * @param	mixed	The data expected for the form.
  * @throws	Exception if there is an error in the form event.
  * @since	1.6
  */
 protected function preprocessForm(JForm $form, $data, $group = 'user')
 {
     $userParams = JComponentHelper::getParams('com_users');
     // Deal with captcha
     $captcha = $userParams->get('captcha', '0');
     $captchaRemind = $userParams->get('allowCaptchaUserReset', '0');
     if ($captcha === '0') {
         $form->removeField('captcha');
     } else {
         if ($captchaRemind === '0') {
             $form->removeField('captcha');
         } else {
             $form->setFieldAttribute('captcha', 'plugin', $captcha);
         }
     }
     parent::preprocessForm($form, $data, $group);
 }
开发者ID:ngxuanmui,项目名称:hanhphuc.vn,代码行数:25,代码来源:reset.php

示例6: preprocessForm

 protected function preprocessForm(JForm $form, $data, $group = 'user')
 {
     $userParams = JComponentHelper::getParams('com_bt_socialconnect');
     $session = JFactory::getSession();
     $user = $session->get('btPrepareUser');
     if ($user) {
         $data->name = $user->name;
         $data->username = $user->username;
         $data->email1 = $user->email1;
         $data->email2 = $user->email2;
         $data->enabled_publishing = $user->enabled_publishing;
         $data->socialId = $user->socialId;
         $data->loginType = $user->loginType;
         $data->access_token = $user->access_token;
     }
     if ($userParams->get('site_language') == 1 && $userParams->get('frontend_userparams') == 1) {
         $form->loadFile('sitelang', false);
     }
     parent::preprocessForm($form, $data, $group);
 }
开发者ID:juanferden,项目名称:adoperp,代码行数:20,代码来源:registration.php


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