Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-header.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-header.php on line 8

TasksUtil Class Reference

Public Member Functions

 getCalendarItemData ()

Static Public Member Functions

static getTaskSubscriberData (Task $task)
static renderSubscriberImageAndLinkContent (User $user, $imageSize=36, $class=null)
static getTaskSubscribers (Task $task)
static getUrlToEmail ($model)
static resolveExplicitPermissionsForRequestedByUser (Task $task, Permitable $origRequestedByUser, Permitable $requestedByUser, ExplicitReadWriteModelPermissions $explicitReadWriteModelPermissions)
static markUserHasReadLatest (Task $task, User $user, $hasReadLatest=true)
static getModalDetailsTitle ()
static getModalEditTitle ()
static getModalTitleForCreateTask ($renderType="Create")
static resolveAjaxOptionsForCreateMenuItem ()
static getModalContainerId ()
static resolveAjaxOptionsForModalView ($renderType, $sourceKanbanBoardId=null)
static resolveExtraCloseScriptForModalAjaxOptions ($sourceId=null)
static getModalDetailsLink (Task $task, $controllerId, $moduleId, $moduleClassName, $isOwnerRequiredInDisplay=true)
static resolveActionButtonForTaskByStatus ($statusId, $controllerId, $moduleId, $taskId)
static getTaskStatusMappingToKanbanItemTypeArray ()
static resolveKanbanItemTypeForTaskStatus ($status)
static isKanbanItemTypeValidBasedOnTaskStatus ($kanbanItemType, $taskStatus)
static resolveSubscribeUrl ($taskId)
static resolveSubscriberAjaxOptions ()
static registerSubscriptionScript ($taskId=null)
static registerUnsubscriptionScript ($taskId=null)
static getKanbanSubscriptionScript ($url, $sourceClass, $targetClass, $link)
static getDetailSubscriptionScript ($url, $sourceClass, $targetClass, $link, $taskId)
static getKanbanSubscriptionLink (Task $task, $row)
static getDetailSubscriptionLink (Task $task, $row)
static resolveSubscriptionLink (Task $task, $subscribeLinkClass, $unsubscribeLinkClass)
static getTaskCompletionPercentage (Task $task)
static getKanbanItemTypeToDefaultTaskStatusMappingArray ()
static getDefaultTaskStatusForKanbanItemType ($kanbanItemType)
static createKanbanItemFromTask (Task $task)
static renderCompletionProgressBarContent (Task $task)
static getTaskCompletedCheckListItems (Task $task)
static resolveTaskKanbanViewForRelation ($model, $moduleId, $controller, $kanbanView, $pageView)
static registerTaskModalDetailsScript ($sourceId)
static registerOpenToTaskModalDetailsScript ($taskId, $sourceId)
static resolveFirstRelatedModelStringValue (Task $task)
static resolveFirstRelatedModel (Task $task)
static castDownActivityItem (Item $activityItem)
static renderCompletionDateTime (Task $task)
static resolveModalSaveActionNameForByRelationModelId ($relationModelId, $copyAction=null)
static addSubscriber (User $user, Task $task, $hasReadLatest=false)
static processKanbanItemUpdateOnButtonAction ($targetStatus, $taskId, $sourceKanbanType)
static resolveAndGetSortOrderForTaskOnKanbanBoard ($targetKanbanType, Task $task)
static sortKanbanColumnItems ($kanbanType, Item $childObjectOfItem)
static checkKanbanTypeByStatusAndUpdateIfRequired (Task $task)
static resolveAndRenderTaskCardDetailsSubscribersContent (Task $task)
static registerTaskModalEditScript ($sourceId, $routeParams)
static registerTaskModalCopyScript ($sourceId, $routeParams)
static registerTaskModalScript ($type, $url, $selector, $sourceId=null)
static registerTaskModalDeleteScript ($sourceId)
static resolveShouldOpenToTask ($gridId)

Detailed Description

Helper class for working with tasks

Definition at line 40 of file TasksUtil.php.


Member Function Documentation

static getTaskSubscriberData ( Task task  )  [static]

Get task subscriber data

Parameters:
Task $task
Returns:
string

Definition at line 47 of file TasksUtil.php.

static renderSubscriberImageAndLinkContent ( User user,
imageSize = 36,
class = null 
) [static]

Renders subscriber image and link content

Parameters:
User $user
int $imageSize
string $class
Returns:
string

Definition at line 73 of file TasksUtil.php.

static getTaskSubscribers ( Task task  )  [static]

Gets task participant

Parameters:
Task $task
Returns:
array

Definition at line 91 of file TasksUtil.php.

static getUrlToEmail ( model  )  [static]

Gets url to task detail view

Parameters:
Task $model
Returns:
string

Definition at line 107 of file TasksUtil.php.

static resolveExplicitPermissionsForRequestedByUser ( Task task,
Permitable origRequestedByUser,
Permitable requestedByUser,
ExplicitReadWriteModelPermissions explicitReadWriteModelPermissions 
) [static]

Resolve explicit permissions of the requested by user for the task

Parameters:
Task $task
Permitable $origRequestedByUser
Permitable $requestedByUser
ExplicitReadWriteModelPermissions $explicitReadWriteModelPermissions

Definition at line 120 of file TasksUtil.php.

static markUserHasReadLatest ( Task task,
User user,
hasReadLatest = true 
) [static]

Given a task and a user, mark that the user has read or not read the latest changes as a task owner, requested by user or subscriber

Parameters:
Task $task
User $user
Boolean $hasReadLatest

Definition at line 135 of file TasksUtil.php.

static getModalDetailsTitle (  )  [static]
Returns:
string

Definition at line 160 of file TasksUtil.php.

static getModalEditTitle (  )  [static]
Returns:
string

Definition at line 170 of file TasksUtil.php.

static getModalTitleForCreateTask ( renderType = "Create"  )  [static]

Gets modal title for create task modal window

Parameters:
string $renderType
Returns:
string

Definition at line 182 of file TasksUtil.php.

static resolveAjaxOptionsForCreateMenuItem (  )  [static]

Resolves ajax options for create link

Returns:
array

Definition at line 208 of file TasksUtil.php.

static getModalContainerId (  )  [static]
Returns:
string

Definition at line 216 of file TasksUtil.php.

static resolveAjaxOptionsForModalView ( renderType,
sourceKanbanBoardId = null 
) [static]
Parameters:
$renderType 
string|null $sourceKanbanBoardId
Returns:
array

Definition at line 226 of file TasksUtil.php.

static getModalDetailsLink ( Task task,
controllerId,
moduleId,
moduleClassName,
isOwnerRequiredInDisplay = true 
) [static]

Get link for going to the task modal detail view

Parameters:
Task $task
$controllerId 
$moduleId 
$moduleClassName 
Returns:
null|string

Definition at line 252 of file TasksUtil.php.

static resolveActionButtonForTaskByStatus ( statusId,
controllerId,
moduleId,
taskId 
) [static]

Resolve action button for task by status

Parameters:
string $statusId
string $controllerId
string $moduleId
string $taskId
Returns:
string

Definition at line 288 of file TasksUtil.php.

static getTaskStatusMappingToKanbanItemTypeArray (  )  [static]

Maps task status to kanban item type

Returns:
array

Definition at line 333 of file TasksUtil.php.

static resolveKanbanItemTypeForTaskStatus ( status  )  [static]

Resolve kanban item type for task status

Parameters:
string $status
Returns:
int

Definition at line 349 of file TasksUtil.php.

static isKanbanItemTypeValidBasedOnTaskStatus ( kanbanItemType,
taskStatus 
) [static]

Some task status's are ok for multiple kanban item types.

Parameters:
$kanbanItemType 
$taskStatus 
Returns:
true if the task status is ok for the current kanbanItemType

Definition at line 365 of file TasksUtil.php.

static resolveSubscribeUrl ( taskId  )  [static]

Resolves Subscribe Url

Parameters:
int $taskId
Returns:
string

Definition at line 399 of file TasksUtil.php.

static resolveSubscriberAjaxOptions (  )  [static]

Resolve subscriber ajax options

Returns:
array

Definition at line 408 of file TasksUtil.php.

static registerSubscriptionScript ( taskId = null  )  [static]

Register subscription script

Parameters:
int $taskId

Definition at line 426 of file TasksUtil.php.

static registerUnsubscriptionScript ( taskId = null  )  [static]

Register unsubscription script

Parameters:
int $taskId

Definition at line 449 of file TasksUtil.php.

static getKanbanSubscriptionScript ( url,
sourceClass,
targetClass,
link 
) [static]

Get subscription script

Parameters:
string $url
string $sourceClass
string $targetClass
string $link
Returns:
string

Definition at line 476 of file TasksUtil.php.

static getDetailSubscriptionScript ( url,
sourceClass,
targetClass,
link,
taskId 
) [static]

Get subscription script

Parameters:
string $url
string $sourceClass
string $targetClass
string $link
Returns:
string

Definition at line 517 of file TasksUtil.php.

static getKanbanSubscriptionLink ( Task task,
row 
) [static]

Get kanban subscription link for the task. This would be in kanban view for a related model for e.g Project

Parameters:
Task $task
int $row
Returns:
string

Definition at line 558 of file TasksUtil.php.

static getDetailSubscriptionLink ( Task task,
row 
) [static]

Get subscription link on the task detail view

Parameters:
Task $task
int $row
Returns:
string

Definition at line 569 of file TasksUtil.php.

static resolveSubscriptionLink ( Task task,
subscribeLinkClass,
unsubscribeLinkClass 
) [static]

Resolve subscription link for detail and kanban view

Parameters:
Task $task
string $subscribeLinkClass
string $unsubscribeLinkClass
Returns:
string

Definition at line 581 of file TasksUtil.php.

static getTaskCompletionPercentage ( Task task  )  [static]

Get task completion percentage

Parameters:
int $id
Returns:
float

Definition at line 610 of file TasksUtil.php.

static getKanbanItemTypeToDefaultTaskStatusMappingArray (  )  [static]

Maps task status to kanban item type

Returns:
array

Definition at line 629 of file TasksUtil.php.

static getDefaultTaskStatusForKanbanItemType ( kanbanItemType  )  [static]

Gets default task status for kanban item type

Parameters:
int $kanbanItemType

Definition at line 643 of file TasksUtil.php.

static createKanbanItemFromTask ( Task task  )  [static]

Saves the kanban item from task

Parameters:
type array

Definition at line 654 of file TasksUtil.php.

static renderCompletionProgressBarContent ( Task task  )  [static]

Render completion progress bar

Parameters:
Task $task
Returns:
string

Definition at line 678 of file TasksUtil.php.

static getTaskCompletedCheckListItems ( Task task  )  [static]

Get task completed check list items

Parameters:
Task $task
Returns:
int

Definition at line 695 of file TasksUtil.php.

static resolveTaskKanbanViewForRelation ( model,
moduleId,
controller,
kanbanView,
pageView 
) [static]

Resolve task kanban view for relation

Parameters:
RedBeanModel $model
string $moduleId
ZurmoModuleController $controller
TasksForRelatedKanbanView $kanbanView
ZurmoDefaultPageView $pageView
Returns:
ZurmoDefaultPageView

Definition at line 717 of file TasksUtil.php.

static registerTaskModalDetailsScript ( sourceId  )  [static]

Register script for task detail link. This would be called from both kanban and open task portlet

Parameters:
string $sourceId

Definition at line 745 of file TasksUtil.php.

static registerOpenToTaskModalDetailsScript ( taskId,
sourceId 
) [static]

Register script for special task detail link. This is from a redirect of something like tasks/default/details and it should open up the task immediately.

Parameters:
int $taskId
string $sourceId

Definition at line 778 of file TasksUtil.php.

static resolveFirstRelatedModelStringValue ( Task task  )  [static]

Resolves the related project or first related activityItem string value

Parameters:
Task $task
Returns:
null|string

Definition at line 799 of file TasksUtil.php.

static resolveFirstRelatedModel ( Task task  )  [static]

Resolves the related project or first related activityItem model

Parameters:
Task $task
Returns:
null|RedBeanModel $model

Definition at line 814 of file TasksUtil.php.

static renderCompletionDateTime ( Task task  )  [static]

Renders completion date time content for the task

Parameters:
Task $task
Returns:
string

Definition at line 855 of file TasksUtil.php.

static resolveModalSaveActionNameForByRelationModelId ( relationModelId,
copyAction = null 
) [static]
Parameters:
$relationModelId 
Returns:
string

Definition at line 869 of file TasksUtil.php.

static addSubscriber ( User user,
Task task,
hasReadLatest = false 
) [static]

Add subscriber to the task

Parameters:
User $user
Task $task
bool $hasReadLatest

Definition at line 896 of file TasksUtil.php.

static processKanbanItemUpdateOnButtonAction ( targetStatus,
taskId,
sourceKanbanType 
) [static]

Process kanban item update on button click on kanban board

Parameters:
int $targetStatus
int $taskId
int $sourceKanbanType

Definition at line 914 of file TasksUtil.php.

static resolveAndGetSortOrderForTaskOnKanbanBoard ( targetKanbanType,
Task task 
) [static]

Returns sortorder

Parameters:
Task $task
int $targetKanbanType
Returns:
int

Definition at line 969 of file TasksUtil.php.

static sortKanbanColumnItems ( kanbanType,
Item childObjectOfItem 
) [static]

Reset the sortoder for kanban type for the associated to it

Parameters:
Task $task
int $kanbanType
Item $childObjectOfItem
Returns:
int

Definition at line 993 of file TasksUtil.php.

static checkKanbanTypeByStatusAndUpdateIfRequired ( Task task  )  [static]

Check kanban type for status and update if it is required, it is required when user is changing the status from modal detail view

Parameters:
$task Task

Definition at line 1008 of file TasksUtil.php.

static resolveAndRenderTaskCardDetailsSubscribersContent ( Task task  )  [static]

Resolve and render task card details subscribers content

Parameters:
Task $task
Returns:
type

Definition at line 1047 of file TasksUtil.php.

static registerTaskModalEditScript ( sourceId,
routeParams 
) [static]

Register task modal edit script

Parameters:
string $sourceId
array $routeParams

Definition at line 1080 of file TasksUtil.php.

static registerTaskModalCopyScript ( sourceId,
routeParams 
) [static]

Register task modal copy script

Parameters:
string $sourceId
array $routeParams

Definition at line 1095 of file TasksUtil.php.

static registerTaskModalScript ( type,
url,
selector,
sourceId = null 
) [static]

Get task modal script

Parameters:
string $type
string $url
string $selector
mixed $sourceId
Returns:
string

Definition at line 1114 of file TasksUtil.php.

static registerTaskModalDeleteScript ( sourceId  )  [static]

Register task modal delete script

Parameters:
string $sourceId

Definition at line 1144 of file TasksUtil.php.

static resolveShouldOpenToTask ( gridId  )  [static]

Resolve that should task be opened in modal detal view

Definition at line 1178 of file TasksUtil.php.

getCalendarItemData (  ) 

Gets full calendar item data.

Returns:
string

Definition at line 1191 of file TasksUtil.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Sat Jan 19 07:10:28 2019

Warning: mysql_connect(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/zurmoorg/public_html/z-footer.php on line 8

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/zurmoorg/public_html/z-footer.php on line 8