예제 #1
0
 /**
  * This function contains the default action
  *
  * @param $action
  *
  * @static
  * @access public
  */
 static function form($action, $contact_type, $contact_sub_type)
 {
     CRM_Utils_System::setUserContext(array('civicrm/contact/search/basic', 'civicrm/contact/view'));
     $wrapper = new CRM_Utils_Wrapper();
     $properties = CRM_Core_Component::contactSubTypeProperties($contact_sub_type, 'Edit');
     if ($properties) {
         $wrapper->run($properties['class'], ts('New %1', array(1 => $contact_sub_type)), $action, TRUE);
     } else {
         $wrapper->run('CRM_Contact_Form_Contact', ts('New Contact'), $action, TRUE);
     }
 }
예제 #2
0
 /**
  * This function contains the default action
  *
  * @param $action 
  *
  * @static
  * @access public
  */
 function form($action)
 {
     CRM_Utils_System::setUserContext(array('civicrm/contact/search/basic', 'civicrm/contact/view'));
     $wrapper =& new CRM_Utils_Wrapper();
     $wrapper->run('CRM_Contact_Form_Edit', ts('Contact Page'), $action);
 }