Merge pull request #4836 from colemanw/edit
[civicrm-core.git] / CRM / Contact / Task.php
index 85b387e440155c7c48c6db923a1a5758ebfbb774..c31def46d556c3e6764df09a50216cb007e18096 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.5                                                |
+ | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2014                                |
  +--------------------------------------------------------------------+
@@ -39,7 +39,7 @@
  *
  */
 class CRM_Contact_Task {
-  CONST
+  const
     GROUP_CONTACTS = 1,
     REMOVE_CONTACTS = 2,
     TAG_CONTACTS = 3,
@@ -67,7 +67,7 @@ class CRM_Contact_Task {
     COMMUNICATION_PREFS = 25;
 
   /**
-   * the task array
+   * The task array
    *
    * @var array
    * @static
@@ -75,14 +75,14 @@ class CRM_Contact_Task {
   static $_tasks = NULL;
 
   /**
-   * the optional task array
+   * The optional task array
    *
    * @var array
    * @static
    */
   static $_optionalTasks = NULL;
 
-  static function initTasks() {
+  public static function initTasks() {
     if (!self::$_tasks) {
       self::$_tasks = array(
         self::GROUP_CONTACTS => array(
@@ -281,9 +281,8 @@ class CRM_Contact_Task {
    *
    * @return array the set of tasks for a group of contacts
    * @static
-   * @access public
    */
-  static function &taskTitles() {
+  public static function &taskTitles() {
     self::initTasks();
 
     $titles = array();
@@ -310,16 +309,15 @@ class CRM_Contact_Task {
   }
 
   /**
-   * show tasks selectively based on the permission level
+   * Show tasks selectively based on the permission level
    * of the user
    *
    * @param int $permission
    * @param bool $deletedContacts  are these tasks for operating on deleted contacts?
    *
    * @return array set of tasks that are valid for the user
-   * @access public
    */
-  static function &permissionedTaskTitles($permission, $deletedContacts = FALSE) {
+  public static function &permissionedTaskTitles($permission, $deletedContacts = FALSE) {
     self::initTasks();
     $tasks = array();
     if ($deletedContacts) {
@@ -360,9 +358,8 @@ class CRM_Contact_Task {
    *
    * @return array the set of optional tasks for a group of contacts
    * @static
-   * @access public
    */
-  static function &optionalTaskTitle() {
+  public static function &optionalTaskTitle() {
     $tasks = array(
       self::SAVE_SEARCH_UPDATE => self::$_tasks[self::SAVE_SEARCH_UPDATE]['title'],
     );
@@ -374,7 +371,7 @@ class CRM_Contact_Task {
    *
    * @return array
    */
-  static function getTask($value) {
+  public static function getTask($value) {
     self::initTasks();
 
     if (!CRM_Utils_Array::value($value, self::$_tasks)) {
@@ -387,4 +384,3 @@ class CRM_Contact_Task {
     );
   }
 }
-