<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
*
*/
class CRM_Contact_Task {
- CONST
+ const
GROUP_CONTACTS = 1,
REMOVE_CONTACTS = 2,
TAG_CONTACTS = 3,
* The task array
*
* @var array
- * @static
*/
static $_tasks = NULL;
* 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(
* These tasks are the core set of tasks that the user can perform
* on a contact / group of contacts
*
- * @return array the set of tasks for a group of contacts
- * @static
- * @access public
+ * @return array
+ * the set of tasks for a group of contacts
*/
- static function &taskTitles() {
+ public static function &taskTitles() {
self::initTasks();
$titles = array();
* of the user
*
* @param int $permission
- * @param bool $deletedContacts are these tasks for operating on deleted contacts?
+ * @param bool $deletedContacts
+ * Are these tasks for operating on deleted contacts?.
*
- * @return array set of tasks that are valid for the user
- * @access public
+ * @return array
+ * set of tasks that are valid for the user
*/
- static function &permissionedTaskTitles($permission, $deletedContacts = FALSE) {
+ public static function &permissionedTaskTitles($permission, $deletedContacts = FALSE) {
self::initTasks();
$tasks = array();
if ($deletedContacts) {
/**
* These tasks get added based on the context the user is in
*
- * @return array the set of optional tasks for a group of contacts
- * @static
- * @access public
+ * @return array
+ * the set of optional tasks for a group of contacts
*/
- static function &optionalTaskTitle() {
+ public static function &optionalTaskTitle() {
$tasks = array(
self::SAVE_SEARCH_UPDATE => self::$_tasks[self::SAVE_SEARCH_UPDATE]['title'],
);
*
* @return array
*/
- static function getTask($value) {
+ public static function getTask($value) {
self::initTasks();
if (!CRM_Utils_Array::value($value, self::$_tasks)) {
CRM_Utils_Array::value('result', self::$_tasks[$value]),
);
}
-}
+}