Documentation

rse_workflow_functions.php

Table of Contents

Functions

rse_workflow_get_actions()  : array<string|int, mixed>
Fetch a list of actions from the rse_workflow plugin Action text, name, and button text support i18n translation strings
rse_workflow_save_action()  : mixed
rse_workflow_delete_action()  : mixed
rse_workflow_get_archive_states()  : mixed
rse_workflow_delete_state()  : mixed
rse_workflow_get_valid_actions()  : array<string|int, mixed>
Validate list of actions for a resource or a batch of resources. For a batch of resources, an action is valid only if using the 'wf' permission is set for that action.
rse_workflow_validate_action()  : bool
Validate a workflow action for a particular resource
rse_workflow_compile_actions()  : array<string|int, mixed>
Compile workflow actions for the unified dropdown actions. This will validate actions using only 'wf' permissions (@see rse_workflow_get_valid_actions)
rse_workflow_create_state()  : bool|array<string|int, mixed>
Create new workflow state

Functions

rse_workflow_get_actions()

Fetch a list of actions from the rse_workflow plugin Action text, name, and button text support i18n translation strings

rse_workflow_get_actions([string|int $status = "" ][, string|int $ref = "" ]) : array<string|int, mixed>
Parameters
$status : string|int = ""

Filter based on statusfrom, onle a single workflow state reference can be passed

$ref : string|int = ""

Reference ID of action to return a single specific action

Return values
array<string|int, mixed>

SQL results from workflow_actions table. name, text, and buttontext values are translated using i18n translation

rse_workflow_save_action()

rse_workflow_save_action([mixed $ref = "" ]) : mixed
Parameters
$ref : mixed = ""

rse_workflow_delete_action()

rse_workflow_delete_action(mixed $action) : mixed
Parameters
$action : mixed

rse_workflow_delete_state()

rse_workflow_delete_state(mixed $state, mixed $newstate) : mixed
Parameters
$state : mixed
$newstate : mixed

rse_workflow_get_valid_actions()

Validate list of actions for a resource or a batch of resources. For a batch of resources, an action is valid only if using the 'wf' permission is set for that action.

rse_workflow_get_valid_actions(array<string|int, mixed> $actions, bool $use_perms_only) : array<string|int, mixed>
Parameters
$actions : array<string|int, mixed>

List of workflow actions (@see rse_workflow_get_actions())

$use_perms_only : bool

Validate actions using edit access (e perm) on the destination state -OR- 'wf' permissions

Return values
array<string|int, mixed>

rse_workflow_validate_action()

Validate a workflow action for a particular resource

rse_workflow_validate_action(array<string|int, mixed> $action, array<string|int, mixed> $resource) : bool
Parameters
$action : array<string|int, mixed>

Workflow action structure (@see rse_workflow_get_actions())

$resource : array<string|int, mixed>

Resource structure (@see get_resource_data() or do_search())

Return values
bool

rse_workflow_compile_actions()

Compile workflow actions for the unified dropdown actions. This will validate actions using only 'wf' permissions (@see rse_workflow_get_valid_actions)

rse_workflow_compile_actions(array<string|int, mixed> $url_params) : array<string|int, mixed>
Parameters
$url_params : array<string|int, mixed>

Inject any url params if needed. Useful to pass along search params.

Return values
array<string|int, mixed>

rse_workflow_create_state()

Create new workflow state

rse_workflow_create_state(array<string|int, mixed> $data) : bool|array<string|int, mixed>
Parameters
$data : array<string|int, mixed>

New workflow state data. Requires at least a 'name' property!

Return values
bool|array<string|int, mixed>

Returns false if it fails or the new state data.

On this page

Search results