Gravity_Flow_Assignee
Class Gravity_Flow_Assignee
Source: includes/assignees/class-assignee.php:20
Details
- Kind:
class - Namespace:
(global)
Properties
| Property | Type | Description |
|---|---|---|
$name | string | The unique name of this assignee. |
$id | string | The ID of this assignee. |
$type | string | The Type of this assignee. |
$key | string | The Assignee key. |
$editable_fields | array | The editable fields for this assignee. |
$user | WP_User | The WordPress user account for this assignee |
$step | Gravity_Flow_Step | bool | The step. |
Methods
| Method | Description |
|---|---|
__construct() | Gravity_Flow_Assignee constructor. |
get_id() | Return the assignee ID. |
get_key() | Return the assignee key. |
get_type() | Return the assignee type. |
get_step() | Return the step for this assignee. |
get_editable_fields() | Return the editable field IDs for this assignee. |
get_user() | Returns the user account for this assignee. |
get_status() | Returns the status. |
get_status_key() | Returns the status key. |
update_status() | Update the status entry meta items for this assignee. |
get_display_name() | Return the assignee display name. |
remove() | Remove the assignee from the current step by deleting the associated entry meta items. |
get_status_timestamp() | Returns the status timestamp. |
get_reminder_timestamp() | Returns the status timestamp. |
set_reminder_timestamp() | Sets the timestamp for the reminder. |
log_event() | Log an event for the current assignee. |
send_notification() | Sends a notification to the assignee. |
is_current_user() | Checks whether the current user (WP or Token auth) is an assignee. |
process_status() | Processes the status update for the assignee. |
get_status_label() | Returns the label to be displayed for the assignee on the workflow detail page. |
replace_variables() | Override this method to replace merge tags. |
Method Reference
__construct()
public function __construct( $args=[], $step=false )
Gravity_Flow_Assignee constructor.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$args | string | array | [] | An assignee key or array. |
$step | bool | Gravity_Flow_Step | false | The current step or false. |
Since: 1.0
Source: includes/assignees/class-assignee.php:95
get_id()
public function get_id()
Return the assignee ID.
Returns
string
Source: includes/assignees/class-assignee.php:183
get_key()
public function get_key()
Return the assignee key.
Returns
string
Source: includes/assignees/class-assignee.php:192
get_type()
public function get_type()
Return the assignee type.
Returns
string
Source: includes/assignees/class-assignee.php:201
get_step()
public function get_step()
Return the step for this assignee.
Returns
- Gravity_Flow_Step |
bool
Since: 2.3.2
Source: includes/assignees/class-assignee.php:212
get_editable_fields()
public function get_editable_fields()
Return the editable field IDs for this assignee.
Returns
array
Source: includes/assignees/class-assignee.php:221
get_user()
public function get_user()
Returns the user account for this assignee.
Returns
Since: 1.7.1
Source: includes/assignees/class-assignee.php:232
get_status()
public function get_status()
Returns the status.
Returns
bool|mixed
Source: includes/assignees/class-assignee.php:241
get_status_key()
public function get_status_key()
Returns the status key.
Returns
string
Source: includes/assignees/class-assignee.php:260
update_status()
public function update_status( $new_assignee_status=false )
Update the status entry meta items for this assignee.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$new_assignee_status | string | bool | false | The new status for this assignee or false. |
Source: includes/assignees/class-assignee.php:275
get_display_name()
public function get_display_name()
Return the assignee display name.
Returns
string
Source: includes/assignees/class-assignee.php:294
remove()
public function remove()
Remove the assignee from the current step by deleting the associated entry meta items.
Source: includes/assignees/class-assignee.php:304
get_status_timestamp()
public function get_status_timestamp()
Returns the status timestamp.
Returns
bool|mixed
Source: includes/assignees/class-assignee.php:320
get_reminder_timestamp()
public function get_reminder_timestamp()
Returns the status timestamp.
Returns
bool|mixed
Source: includes/assignees/class-assignee.php:333
set_reminder_timestamp()
public function set_reminder_timestamp( $timestamp=false )
Sets the timestamp for the reminder.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$timestamp | bool | int | false | Unix GMT timestamp or false. |
Source: includes/assignees/class-assignee.php:346
log_event()
public function log_event( $status, $duration=0 )
Log an event for the current assignee.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$status | string | The assignee status. | |
$duration | int | 0 | Time interval in seconds, if any. |
Source: includes/assignees/class-assignee.php:364
send_notification()
public function send_notification( $notification )
Sends a notification to the assignee.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$notification | array | The notification to be sent. |
Since: 2.1
Source: includes/assignees/class-assignee.php:377
is_current_user()
public function is_current_user()
Checks whether the current user (WP or Token auth) is an assignee.