Exemplo n.º 1
0
 /**
  * This function contains the actions for group arguments
  *
  * @params $args array this array contains the arguments of the url 
  *
  * @static
  * @access public
  */
 function group($args)
 {
     if ($args[1] !== 'group') {
         return;
     }
     switch (CRM_Utils_Array::value(2, $args)) {
         case 'add':
             require_once 'CRM/Group/Controller.php';
             $controller =& new CRM_Group_Controller(ts('Groups'), CRM_CORE_ACTION_ADD);
             $session =& CRM_Core_Session::singleton();
             $session->pushUserContext(CRM_Utils_System::url('civicrm/group', 'reset=1'));
             return $controller->run();
         case 'search':
             return CRM_Core_Invoke::search($args);
         default:
             require_once 'CRM/Group/Page/Group.php';
             $view =& new CRM_Group_Page_Group(ts('View Groups'));
             return $view->run();
     }
 }