示例#1
0
文件: Tab.php 项目: ksecor/civicrm
 function preProcess()
 {
     // Make sure case types have been configured for the component
     require_once 'CRM/Core/OptionGroup.php';
     $caseType = CRM_Core_OptionGroup::values('case_type');
     if (empty($caseType)) {
         $this->assign('notConfigured', 1);
         return;
     }
     $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);
     $this->_contactId = CRM_Utils_Request::retrieve('cid', 'Positive', $this);
     $this->_context = CRM_Utils_Request::retrieve('context', 'String', $this);
     // contact id is not mandatory for case form. If not found, don't call
     // parent's pre-process and proceed further.
     if ($this->_contactId) {
         parent::preProcess();
     } else {
         // we would need action to proceed further.
         $this->_action = CRM_Utils_Request::retrieve('action', 'String', $this, false, 'add');
         if ($this->_action & CRM_Core_Action::VIEW) {
             CRM_Core_Error::fatal('Contact Id is required for view action.');
         }
         $this->assign('action', $this->_action);
     }
     $activityTypes = CRM_Case_PseudoConstant::activityType();
     $this->assign('openCaseId', $activityTypes['Open Case']['id']);
     $this->assign('changeCaseTypeId', $activityTypes['Change Case Type']['id']);
     $this->assign('changeCaseStatusId', $activityTypes['Change Case Status']['id']);
     $this->assign('changeCaseStartDateId', $activityTypes['Change Case Start Date']['id']);
 }
示例#2
0
 /** 
  * Heart of the viewing process. The runner gets all the meta data for 
  * the contact and calls the appropriate type of page to view. 
  * 
  * @return void 
  * @access public 
  * 
  */
 function preProcess()
 {
     parent::preProcess();
     //Custom Groups Inline
     $entityType = CRM_Contact_BAO_Contact::getContactType($this->_contactId);
     $groupTree =& CRM_Core_BAO_CustomGroup::getTree($entityType, $this->_contactId);
     CRM_Core_BAO_CustomGroup::buildViewHTML($this, $groupTree);
 }
示例#3
0
 /** 
  * Heart of the viewing process. The runner gets all the meta data for 
  * the contact and calls the appropriate type of page to view. 
  * 
  * @return void 
  * @access public 
  * 
  */
 function preProcess()
 {
     parent::preProcess();
     //retrieve inline custom data
     $entityType = $this->get('contactType');
     $entitySubType = $this->get('contactSubtype');
     $groupTree =& CRM_Core_BAO_CustomGroup::getTree($entityType, $this, $this->_contactId, null, $entitySubType);
     CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree);
     // also create the form element for the activity links box
     $controller = new CRM_Core_Controller_Simple('CRM_Activity_Form_ActivityLinks', ts('Activity Links'), null);
     $controller->setEmbedded(true);
     $controller->run();
 }
 /**
  * Heart of the viewing process. The runner gets all the meta data for
  * the contact and calls the appropriate type of page to view.
  *
  * @return void
  * @access public
  *
  */
 function preProcess()
 {
     parent::preProcess();
     // actions buttom contextMenu
     $menuItems = CRM_Contact_BAO_Contact::contextMenu($this->_contactId);
     $this->assign('actionsMenuList', $menuItems);
     //retrieve inline custom data
     $entityType = $this->get('contactType');
     if ($entitySubType = $this->get('contactSubtype')) {
         $entitySubType = explode(CRM_Core_DAO::VALUE_SEPARATOR, trim($entitySubType, CRM_Core_DAO::VALUE_SEPARATOR));
     }
     $groupTree =& CRM_Core_BAO_CustomGroup::getTree($entityType, $this, $this->_contactId, NULL, $entitySubType);
     CRM_Core_BAO_CustomGroup::buildCustomDataView($this, $groupTree);
     // also create the form element for the activity links box
     $controller = new CRM_Core_Controller_Simple('CRM_Activity_Form_ActivityLinks', ts('Activity Links'), NULL, FALSE, FALSE, TRUE);
     $controller->setEmbedded(TRUE);
     $controller->run();
 }
示例#5
0
文件: Tab.php 项目: ksecor/civicrm
 /**
  * Heart of the viewing process. The runner gets all the meta data for
  * the contact and calls the appropriate type of page to view.
  *
  * @return void
  * @access public
  *
  */
 function preProcess()
 {
     parent::preProcess();
     // we need to retrieve privacy preferences
     // to (un)display the 'Send an Email' link
     $params = array();
     $defaults = array();
     $ids = array();
     $params['id'] = $params['contact_id'] = $this->_contactId;
     CRM_Contact_BAO_Contact::retrieve($params, $defaults, $ids);
     CRM_Contact_BAO_Contact::resolveDefaults($defaults);
     $this->assign($defaults);
     // also create the form element for the activity links box
     $controller =& new CRM_Core_Controller_Simple('CRM_Activity_Form_ActivityLinks', ts('Activity Links'), null);
     $controller->setEmbedded(true);
     $controller->run();
 }
示例#6
0
 /**
  * Heart of the viewing process. The runner gets all the meta data for
  * the contact and calls the appropriate type of page to view.
  *
  * @return void
  * @access public
  *
  */
 function preProcess()
 {
     parent::preProcess();
     // we need to retrieve privacy preferences
     // to (un)display the 'Send an Email' link
     $params = array();
     $defaults = array();
     $ids = array();
     $params['id'] = $params['contact_id'] = $this->_contactId;
     CRM_Contact_BAO_Contact::retrieve($params, $defaults, $ids);
     CRM_Contact_BAO_Contact::resolveDefaults($defaults);
     $this->assign($defaults);
 }
示例#7
0
 /**
  * add a few specific things to view contact
  *
  * @return void 
  * @access public 
  * 
  */
 function preProcess()
 {
     parent::preProcess();
     $this->_groupId = CRM_Utils_Request::retrieve('gid', 'Positive', $this, true);
     $this->assign('groupId', $this->_groupId);
 }