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


PHP CRM_Core_Controller_Simple::getHookedTemplateFileName方法代码示例

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


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

示例1: run

 /**
  * run this page (figure out the action needed and perform it).
  *
  * @return void
  */
 function run()
 {
     $this->preProcess();
     $this->assign('recentlyViewed', FALSE);
     $this->assign('ufGroupName', 'unknown');
     // override later (if possible)
     if ($this->_gid) {
         $ufgroupDAO = new CRM_Core_DAO_UFGroup();
         $ufgroupDAO->id = $this->_gid;
         if (!$ufgroupDAO->find(TRUE)) {
             CRM_Core_Error::fatal();
         }
     }
     if ($this->_gid) {
         // set the title of the page
         if ($ufgroupDAO->title) {
             CRM_Utils_System::setTitle($ufgroupDAO->title);
         }
         if ($ufgroupDAO->name) {
             $this->assign('ufGroupName', $ufgroupDAO->name);
         }
     }
     $this->assign('isReset', TRUE);
     $formController = new CRM_Core_Controller_Simple('CRM_Profile_Form_Search', ts('Search Profile'), CRM_Core_Action::ADD);
     $formController->setEmbedded(TRUE);
     $formController->set('gid', $this->_gid);
     $formController->process();
     $searchError = FALSE;
     // check if there is a POST
     if (!empty($_POST)) {
         if ($formController->validate() !== TRUE) {
             $searchError = TRUE;
         }
     }
     // also get the search tpl name
     $this->assign('searchTPL', $formController->getHookedTemplateFileName());
     $this->assign('search', $this->_search);
     // search if search returned a form error?
     if ((empty($_GET['reset']) || !empty($_GET['force'])) && !$searchError) {
         $this->assign('isReset', FALSE);
         $gidString = $this->_gid;
         if (empty($this->_profileIds)) {
             $gids = $this->_gid;
         } else {
             $gids = $this->_profileIds;
             $gidString = implode(',', $this->_profileIds);
         }
         $map = 0;
         $linkToUF = 0;
         $editLink = FALSE;
         if ($this->_gid) {
             $map = $ufgroupDAO->is_map;
             $linkToUF = $ufgroupDAO->is_uf_link;
             $editLink = $ufgroupDAO->is_edit_link;
         }
         if ($map) {
             $this->assign('mapURL', CRM_Utils_System::url('civicrm/profile/map', "map=1&gid={$gidString}&reset=1"));
         }
         if (!empty($this->_params['group'])) {
             foreach ($this->_params['group'] as $key => $val) {
                 if (!$val) {
                     unset($this->_params['group'][$key]);
                 }
             }
         }
         // the selector will override this if the user does have
         // edit permissions as determined by the mask, CRM-4341
         // do not allow edit for anon users in joomla frontend, CRM-4668
         $config = CRM_Core_Config::singleton();
         if (!CRM_Core_Permission::check('access CiviCRM') || $config->userFrameworkFrontend == 1) {
             $editLink = FALSE;
         }
         $selector = new CRM_Profile_Selector_Listings($this->_params, $this->_customFields, $gids, $map, $editLink, $linkToUF);
         $controller = new CRM_Core_Selector_Controller($selector, $this->get(CRM_Utils_Pager::PAGE_ID), $this->get(CRM_Utils_Sort::SORT_ID), CRM_Core_Action::VIEW, $this, CRM_Core_Selector_Controller::TEMPLATE);
         $controller->setEmbedded(TRUE);
         $controller->run();
     }
     //CRM-6862 -run form cotroller after
     //selector, since it erase $_POST
     $formController->run();
     return parent::run();
 }
开发者ID:prashantgajare,项目名称:civicrm-core,代码行数:87,代码来源:Listings.php


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