All Data Structures Functions Variables Pages
Public Member Functions | Static Public Member Functions
TasksUtil Class Reference

Public Member Functions

 getCalendarItemData ()
 

Static Public Member Functions

static getUrlToEmail ($model)
 
static resolveExplicitPermissionsForRequestedByUser (Task $task, Permitable $origRequestedByUser, Permitable $requestedByUser, ExplicitReadWriteModelPermissions $explicitReadWriteModelPermissions)
 
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 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, $searchForm, $dataProvider)
 
static resolveOverallTaskKanbanView ($controller, $kanbanView, $pageView, $searchForm, $dataProvider)
 
static resolveRelatedAdditionalSearchMetadata ($searchForm, &$metadata, $relationAttributeName)
 
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 processKanbanItemUpdateOnButtonAction ($targetStatus, $taskId, $sourceKanbanType)
 
static resolveAndGetSortOrderForTaskOnKanbanBoard ($targetKanbanType, Task $task)
 
static sortKanbanColumnItems ($kanbanType, Item $childObjectOfItem)
 
static checkKanbanTypeByStatusAndUpdateIfRequired (Task $task)
 
static registerTaskModalEditScript ($sourceId, $routeParams)
 
static registerTaskModalCopyScript ($sourceId, $routeParams)
 
static registerTaskModalScript ($type, $url, $selector, $sourceId=null)
 
static registerTaskModalDeleteScript ($sourceId)
 
static resolveShouldOpenToTask ($gridId)
 
static resolveShouldOpenToTaskForDetailsAndRelationsView ()
 
static resolveOpenTasksActionsRedirectUrlForDetailsAndRelationsView ($redirectUrl)
 

Detailed Description

Helper class for working with tasks

Definition at line 40 of file TasksUtil.php.

Member Function Documentation

static getUrlToEmail (   $model)
static

Gets url to task detail view

Parameters
Task$model
Returns
string

Definition at line 47 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 60 of file TasksUtil.php.

static getModalDetailsTitle ( )
static
Returns
string

Definition at line 71 of file TasksUtil.php.

static getModalEditTitle ( )
static
Returns
string

Definition at line 81 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 93 of file TasksUtil.php.

static resolveAjaxOptionsForCreateMenuItem ( )
static

Resolves ajax options for create link

Returns
array

Definition at line 119 of file TasksUtil.php.

static getModalContainerId ( )
static
Returns
string

Definition at line 127 of file TasksUtil.php.

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

Definition at line 137 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 163 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 199 of file TasksUtil.php.

static getTaskStatusMappingToKanbanItemTypeArray ( )
static

Maps task status to kanban item type

Returns
array

Definition at line 244 of file TasksUtil.php.

static resolveKanbanItemTypeForTaskStatus (   $status)
static

Resolve kanban item type for task status

Parameters
string$status
Returns
int

Definition at line 260 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 276 of file TasksUtil.php.

static getTaskCompletionPercentage ( Task  $task)
static

Get task completion percentage

Parameters
int$id
Returns
float

Definition at line 310 of file TasksUtil.php.

static getKanbanItemTypeToDefaultTaskStatusMappingArray ( )
static

Maps task status to kanban item type

Returns
array

Definition at line 329 of file TasksUtil.php.

static getDefaultTaskStatusForKanbanItemType (   $kanbanItemType)
static

Gets default task status for kanban item type

Parameters
int$kanbanItemType

Definition at line 343 of file TasksUtil.php.

static createKanbanItemFromTask ( Task  $task)
static

Saves the kanban item from task

Parameters
typearray

Definition at line 354 of file TasksUtil.php.

static renderCompletionProgressBarContent ( Task  $task)
static

Render completion progress bar

Parameters
Task$task
Returns
string

Definition at line 378 of file TasksUtil.php.

static getTaskCompletedCheckListItems ( Task  $task)
static

Get task completed check list items

Parameters
Task$task
Returns
int

Definition at line 395 of file TasksUtil.php.

static resolveTaskKanbanViewForRelation (   $model,
  $moduleId,
  $controller,
  $kanbanView,
  $pageView,
  $searchForm,
  $dataProvider 
)
static

Resolve task kanban view for relation

Parameters
RedBeanModel$model
string$moduleId
ZurmoModuleController$controller
TasksForRelatedKanbanView$kanbanView
ZurmoDefaultPageView$pageView
TasksSearchForm$searchForm
$dataProvider
Returns
ZurmoDefaultPageView

Definition at line 419 of file TasksUtil.php.

static resolveOverallTaskKanbanView (   $controller,
  $kanbanView,
  $pageView,
  $searchForm,
  $dataProvider 
)
static

Resolve overall task kanban view

Parameters
ZurmoModuleController$controller
TasksForRelatedKanbanView$kanbanView
ZurmoDefaultPageView$pageView
TasksSearchForm$searchForm
$dataProvider
Returns
ZurmoDefaultPageView

Definition at line 453 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 515 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 548 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 569 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 584 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 625 of file TasksUtil.php.

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

Definition at line 639 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 666 of file TasksUtil.php.

static resolveAndGetSortOrderForTaskOnKanbanBoard (   $targetKanbanType,
Task  $task 
)
static

Returns sortorder

Parameters
Task$task
int$targetKanbanType
Returns
int

Definition at line 721 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 745 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
$taskTask

Definition at line 760 of file TasksUtil.php.

static registerTaskModalEditScript (   $sourceId,
  $routeParams 
)
static

Register task modal edit script

Parameters
string$sourceId
array$routeParams

Definition at line 799 of file TasksUtil.php.

static registerTaskModalCopyScript (   $sourceId,
  $routeParams 
)
static

Register task modal copy script

Parameters
string$sourceId
array$routeParams

Definition at line 814 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 833 of file TasksUtil.php.

static registerTaskModalDeleteScript (   $sourceId)
static

Register task modal delete script

Parameters
string$sourceId

Definition at line 863 of file TasksUtil.php.

static resolveShouldOpenToTask (   $gridId)
static

Resolve that should task be opened in modal detail view

Definition at line 897 of file TasksUtil.php.

getCalendarItemData ( )

Gets full calendar item data.

Returns
string

Definition at line 910 of file TasksUtil.php.

static resolveShouldOpenToTaskForDetailsAndRelationsView ( )
static

Resolve that should a task be opened on details and relations view.

Definition at line 927 of file TasksUtil.php.

static resolveOpenTasksActionsRedirectUrlForDetailsAndRelationsView (   $redirectUrl)
static

Resolve redirect url in case of open task actions on details and relations view. This is required else same params get added to create url.

Parameters
stringredirect url

Definition at line 942 of file TasksUtil.php.


The documentation for this class was generated from the following file:
Generated on Sat May 30 2020 07:11:06