Overview

Classes

  • Gravity_Flow_API
  • Gravity_Flow_Step
  • Gravity_Flow_Step_Feed_Add_On
  • Overview
  • Class

Class Gravity_Flow_Step

An abstract class used as the base for all Steps.

Class Gravity_Flow_Step

stdClass
Extended by Gravity_Flow_Step

Direct known subclasses

Gravity_Flow_Step_Feed_Add_On
Abstract
Package: GravityFlow\Classes\Step
Copyright: Copyright (c) 2015-2018, Steven Henty S.L.
License: GNU Public License
Since: 1.0
Located at
Methods summary
public
# __construct( array $feed = array(), null|array $entry = null )

The constructor for the Step. Provide an entry object to perform and entry-specific tasks.

The constructor for the Step. Provide an entry object to perform and entry-specific tasks.

Parameters

$feed
Required. The Feed on which this step is based.
$entry
Optional. Instantiate with an entry to perform entry related tasks.
public mixed &
# __get( string $name )

Magic method to allow direct access to the settings as properties. Returns an empty string for undefined properties allowing for graceful backward compatibility where new settings may not have been defined in stored settings.

Magic method to allow direct access to the settings as properties. Returns an empty string for undefined properties allowing for graceful backward compatibility where new settings may not have been defined in stored settings.

Parameters

$name
The property key.

Returns

mixed
public
# __set( string $key, mixed $value )

Sets the value for the specified property.

Sets the value for the specified property.

Parameters

$key
The property key.
$value
The property value.
public boolean
# __isset( string $key )

Determines if the specified property has been defined.

Determines if the specified property has been defined.

Parameters

$key
The property key.

Returns

boolean
public
# __unset( string $key )

Deletes the specified property.

Deletes the specified property.

Parameters

$key
The property key.
public array
# get_status_config( )

Returns an array of the configuration of the status options for this step. These options will appear in the step settings. Override this method to add status options.

Returns an array of the configuration of the status options for this step. These options will appear in the step settings. Override this method to add status options.

For example, a status configuration may look like this: array( 'status' => 'complete', 'status_label' => __( 'Complete', 'gravityflow' ), 'destination_setting_label' => __( 'Next Step', 'gravityflow' ), 'default_destination' => 'next', )

Returns

array
An array of arrays
public array
# get_final_status_config( )

Returns an array of the configuration of the status options for this step.

Returns an array of the configuration of the status options for this step.

Deprecated

Returns

array
public array
# get_actions( )

Returns an array of quick actions to be displayed on the inbox.

Returns an array of quick actions to be displayed on the inbox.

Example:

array( array( 'key' => 'approve', 'icon' => $this->get_approve_icon(), 'label' => __( 'Approve', 'gravityflow' ), 'show_note_field' => true ), array( 'key' => 'reject', 'icon' => $this->get_reject_icon(), 'label' => __( 'Reject', 'gravityflow' ), 'show_note_field' => false ), );

Returns

array
public string
# get_rest_base( )

Returns the resource slug for the REST API.

Returns the resource slug for the REST API.

Returns

string
public WP_REST_Response|mixed
# handle_rest_request( WP_REST_Request $request )

Process the REST request for an entry.

Process the REST request for an entry.

Deprecated

1.7.1

Parameters

$request
Full data about the request.

Returns

WP_REST_Response|mixed

If response generated an error, WP_Error, if response is already an instance, WP_HTTP_Response, otherwise returns a new WP_REST_Response instance.

public WP_Error|boolean
# rest_permission_callback( WP_REST_Request $request )

Check if a REST request has permission.

Check if a REST request has permission.

Parameters

$request
Full data about the request.

Returns

WP_Error|boolean

Since

1.4.3
public WP_REST_Response|mixed
# rest_callback( WP_REST_Request $request )

Process the REST request for an entry.

Process the REST request for an entry.

Parameters

$request
Full data about the request.

Returns

WP_REST_Response|mixed

If response generated an error, WP_Error, if response is already an instance, WP_HTTP_Response, otherwise returns a new WP_REST_Response instance.

public string
# get_status_label( string $status )

Returns the translated label for a status key.

Returns the translated label for a status key.

Parameters

$status
The status key.

Returns

string
public string
# get_label( )

Returns the label for the step.

Returns the label for the step.

Override this method to return a custom label.

Returns

string
public array|null
# get_entry( )

If set, returns the entry for this step.

If set, returns the entry for this step.

Returns

array|null
public array|mixed|null
# refresh_entry( )

Flushes and reloads the cached entry for this step.

Flushes and reloads the cached entry for this step.

Returns

array|mixed|null
public mixed
# get_form( )

Returns the Form object for this step.

Returns the Form object for this step.

Returns

mixed
public integer
# get_entry_id( )

Returns the ID for the current entry object. If not set the lid query arg is returned.

Returns the ID for the current entry object. If not set the lid query arg is returned.

Returns

integer
public string
# get_type( )

Returns the step type.

Returns the step type.

Returns

string
public integer
# get_id( )

Returns the Step ID.

Returns the Step ID.

Returns

integer
public boolean
# is_active( )

Is the step active? The step may have been deactivated by the user in the list of steps.

Is the step active? The step may have been deactivated by the user in the list of steps.

Returns

boolean
public boolean
# is_supported( )

Is this step supported on this server? Override to hide this step in the list of step types if the requirements are not met.

Is this step supported on this server? Override to hide this step in the list of step types if the requirements are not met.

Returns

boolean
public integer
# get_form_id( )

Returns the ID of the Form object for the step.

Returns the ID of the Form object for the step.

Returns

integer
public string
# get_name( )

Returns the user-defined name of the step.

Returns the user-defined name of the step.

Returns

string
public Gravity_Flow_Common_Step_Settings
# get_common_settings_api( )

Get the API for preparing common settings such as those which appear on notification tabs.

Get the API for preparing common settings such as those which appear on notification tabs.

Returns

Gravity_Flow_Common_Step_Settings

Since

1.5.1-dev
public array
# get_settings( )

Override this method to add settings to the step. Use the Gravity Forms Add-On Framework Settings API.

Override this method to add settings to the step. Use the Gravity Forms Add-On Framework Settings API.

Returns

array
public string
# get_icon_url( )

Override this method to set a custom icon in the step settings. 32px x 32px

Override this method to set a custom icon in the step settings. 32px x 32px

Returns

string
public string
# get_base_url( )

Returns the Gravity Flow base URL.

Returns the Gravity Flow base URL.

Returns

string
public string
# get_base_path( )

Returns the Gravity Flow base path.

Returns the Gravity Flow base path.

Returns

string
public integer|string
# get_next_step_id( )

Returns the ID of the next step.

Returns the ID of the next step.

Returns

integer|string
public
# set_next_step_id( integer|string $id )

Sets the next step.

Sets the next step.

Parameters

$id
The ID of the next step.
public boolean
# start( )

Attempts to start this step for the current entry. If the step is scheduled then the entry will be queued.

Attempts to start this step for the current entry. If the step is scheduled then the entry will be queued.

Returns

boolean
Is the step complete?
public boolean
# is_queued( )

Is the step currently in the queue waiting for the scheduled start time?

Is the step currently in the queue waiting for the scheduled start time?

Returns

boolean
public boolean
# validate_schedule( )

Validates the step schedule.

Validates the step schedule.

Returns

boolean
Returns true if step is ready to proceed.
public boolean|integer
# get_schedule_timestamp( )

Returns the schedule timestamp (UTC) calculated from the schedule settings.

Returns the schedule timestamp (UTC) calculated from the schedule settings.

Returns

boolean|integer
public boolean
# is_expired( )

Determines if the step has expired.

Determines if the step has expired.

Returns

boolean
public boolean|integer
# get_expiration_timestamp( )

Returns the expiration timestamp calculated from the expiration settings.

Returns the expiration timestamp calculated from the expiration settings.

Returns

boolean|integer
public boolean|integer
# get_timestamp_date( string $setting_type )

Returns the timestamp for the date based expiration or schedule.

Returns the timestamp for the date based expiration or schedule.

Parameters

$setting_type
The setting type: expiration or schedule.

Returns

boolean|integer

Since

2.3.2
public boolean|integer
# get_timestamp_date_field( string $setting_type )

Returns the timestamp for the date field based expiration or schedule.

Returns the timestamp for the date field based expiration or schedule.

Parameters

$setting_type
The setting type: expiration or schedule.

Returns

boolean|integer

Since

2.3.2
public boolean|integer
# get_timestamp_delay( string $setting_type )

Returns the timestamp for the delay based expiration or schedule.

Returns the timestamp for the delay based expiration or schedule.

Parameters

$setting_type
The setting type: expiration or schedule.

Returns

boolean|integer

Since

2.3.2
public string|integer
# get_entry_timestamp( )

Returns the value of the entries workflow_timestamp property.

Returns the value of the entries workflow_timestamp property.

Returns

string|integer
public boolean|integer
# get_step_timestamp( )

Returns the step timestamp from the entry meta.

Returns the step timestamp from the entry meta.

Returns

boolean|integer
public boolean
# process( )

Process the step. For example, assign to a user, send to a service, send a notification or do nothing. Return (bool) $complete.

Process the step. For example, assign to a user, send to a service, send a notification or do nothing. Return (bool) $complete.

Returns

boolean
Is the step complete?
public boolean
# assign( )

Set the assignee status to pending and trigger sending of the assignee notification if enabled.

Set the assignee status to pending and trigger sending of the assignee notification if enabled.

Returns

boolean
public
# maybe_send_assignee_notification( Gravity_Flow_Assignee $assignee, boolean $is_reminder = false )

Sends the assignee email if the assignee_notification_setting is enabled.

Sends the assignee email if the assignee_notification_setting is enabled.

Parameters

$assignee
The assignee properties.
$is_reminder
Indicates if this is a reminder notification. Default is false.
public array
# get_notification( string $type )

Retrieves the properties for the specified notification type; building an array using the keys required by Gravity Forms.

Retrieves the properties for the specified notification type; building an array using the keys required by Gravity Forms.

Parameters

$type
The type of notification currently being processed e.g. assignee, approval, or rejection.

Returns

array
public array
# get_notification_assignees( string $type )

Retrieve the assignees for the current

Retrieve the assignees for the current

Parameters

$type
The type of notification currently being processed e.g. assignee, approval, or rejection.

Returns

array
public
# send_assignee_notification( Gravity_Flow_Assignee $assignee, boolean $is_reminder = false )

Sends the assignee email.

Sends the assignee email.

Parameters

$assignee
The assignee properties.
$is_reminder
Indicates if this is a reminder notification. Default is false.
public string
# replace_variables( string $text, Gravity_Flow_Assignee $assignee )

Override this method to replace merge tags. Important: call the parent method first. $text = parent::replace_variables( $text, $assignee );

Override this method to replace merge tags. Important: call the parent method first. $text = parent::replace_variables( $text, $assignee );

Parameters

$text
The text containing merge tags to be processed.
$assignee
The assignee properties.

Returns

string
public string
# replace_workflow_url_variables( string $text, Gravity_Flow_Assignee $assignee )

Replace the {workflow_entry_link}, {workflow_entry_url}, {workflow_inbox_link}, and {workflow_inbox_url} merge tags.

Replace the {workflow_entry_link}, {workflow_entry_url}, {workflow_inbox_link}, and {workflow_inbox_url} merge tags.

Parameters

$text
The text being processed.
$assignee
The assignee properties.

Returns

string
public string
# get_workflow_url_access_token( array $a, Gravity_Flow_Assignee $assignee )

Get the access token for the workflow_entry_ and workflow_inbox_ merge tags.

Get the access token for the workflow_entry_ and workflow_inbox_ merge tags.

Parameters

$a
The merge tag attributes.
$assignee
The assignee properties.

Returns

string
public string
# replace_workflow_cancel_variables( string $text, Gravity_Flow_Assignee $assignee )

Replace the {workflow_cancel_link} and {workflow_cancel_url} merge tags.

Replace the {workflow_cancel_link} and {workflow_cancel_url} merge tags.

Parameters

$text
The text being processed.
$assignee
The assignee properties.

Returns

string
public string
# get_entry_url( integer|null $page_id = null, Gravity_Flow_Assignee $assignee = null, string $access_token = '' )

Returns the entry URL.

Returns the entry URL.

Parameters

$page_id
The ID of the WordPress Page where the shortcode is located.
$assignee
The assignee properties.
$access_token
The access token for the current assignee.

Returns

string
public string
# get_inbox_url( integer|null $page_id = null, Gravity_Flow_Assignee $assignee = null, string $access_token = '' )

Returns the inbox URL.

Returns the inbox URL.

Parameters

$page_id
The ID of the WordPress Page where the shortcode is located.
$assignee
The assignee properties.
$access_token
The access token for the current assignee.

Returns

string
public
# update_step_status( string|boolean $status = false )

Updates the status for this step.

Updates the status for this step.

Parameters

$status
The step status.
public boolean
# end_if_complete( )

Ends the step if it's complete.

Ends the step if it's complete.

Returns

boolean
Is the step complete?
public array
# get_entry_meta( array $entry_meta, integer $form_id )

Optionally override this method to add additional entry meta. See the Gravity Forms Add-On Framework for details on the return array.

Optionally override this method to add additional entry meta. See the Gravity Forms Add-On Framework for details on the return array.

Parameters

$entry_meta
The entry meta properties.
$form_id
The current form ID.

Returns

array
public string
# get_status_key( string $assignee, boolean|string $type = false )

Returns the status key

Returns the status key

Parameters

$assignee
The assignee key.
$type
The assignee type.

Returns

string
public string
# get_status_timestamp_key( string $assignee_key, boolean|string $type = false )

Returns the status timestamp key

Returns the status timestamp key

Parameters

$assignee_key
The assignee key.
$type
The assignee type.

Returns

string
public boolean|string
# get_status( )

Retrieves the step status from the entry meta.

Retrieves the step status from the entry meta.

Returns

boolean|string
public string
# evaluate_status( )

Evaluates the status for the step.

Evaluates the status for the step.

Returns

string
'queued' or 'complete'
public string
# status_evaluation( )

Override this to perform custom evaluation of the step status.

Override this to perform custom evaluation of the step status.

Returns

string
public string
# get_expiration_status_key( )

Return the value of the status expiration setting.

Return the value of the status expiration setting.

Returns

string
public boolean
# is_condition_met( array $form )

Processes the conditional logic for the entry in this step.

Processes the conditional logic for the entry in this step.

Parameters

$form
The current form.

Returns

boolean
public boolean|string
# get_user_status( integer|boolean $user_id = false )

Returns the status for a user. Defaults to current WordPress user or authenticated email address.

Returns the status for a user. Defaults to current WordPress user or authenticated email address.

Parameters

$user_id
The user ID.

Returns

boolean|string
public array
# get_current_role_status( )

Get the current role and status.

Get the current role and status.

Returns

array
public boolean|string
# get_role_status( string $role )

Returns the status for the given role.

Returns the status for the given role.

Parameters

$role
The user role.

Returns

boolean|string
public
# update_user_status( boolean|integer $user_id = false, boolean|string $new_assignee_status = false )

Updates the status for the given user.

Updates the status for the given user.

Parameters

$user_id
The user ID.
$new_assignee_status
The assignee status.
public
# update_role_status( boolean|string $role = false, boolean|string $new_assignee_status = false )

Updates the status for the given role.

Updates the status for the given role.

Parameters

$role
The user role.
$new_assignee_status
The assignee status.
public Gravity_Flow_Assignee[]
# get_assignees( )

Returns an array of assignees for this step.

Returns an array of assignees for this step.

Returns

Gravity_Flow_Assignee[]
public Gravity_Flow_Assignee[]
# get_assignee_details( )

Retrieve an array containing this steps assignee details.

Retrieve an array containing this steps assignee details.

Deprecated

1.8.1

Returns

Gravity_Flow_Assignee[]
public
# flush_assignees( )

Flush assignee details.

Flush assignee details.

public array
# get_assignee_keys( )

Retrieve an array containing the assignee keys for this step.

Retrieve an array containing the assignee keys for this step.

Returns

array
public Gravity_Flow_Assignee
# get_assignee( string|array $args )

Retrieve the assignee object for the given arguments.

Retrieve the assignee object for the given arguments.

Parameters

$args
An assignee key or array containing the id, type and editable_fields (if applicable).

Returns

Gravity_Flow_Assignee
public string|boolean
# get_current_assignee_key( )

Get the assignee key for the current access token or user.

Get the assignee key for the current access token or user.

Returns

string|boolean
public boolean|string
# get_current_assignee_status( )

Get the status for the current assignee.

Get the status for the current assignee.

Returns

boolean|string
public
# maybe_add_select_assignees( )

Adds the assignees when the 'assign to' setting is set to 'select'.

Adds the assignees when the 'assign to' setting is set to 'select'.

public
# maybe_add_routing_assignees( )

Adds the assignees when the 'assign to' setting is set to 'routing'.

Adds the assignees when the 'assign to' setting is set to 'routing'.

public array
# get_assignee_args( string $assignee_key )

Creates an array containing the assignees id and type from the supplied key.

Creates an array containing the assignees id and type from the supplied key.

Parameters

$assignee_key
The assignee key.

Returns

array
public
# maybe_add_assignee( string|array $args )

Adds the assignee to the step if certain conditions are met.

Adds the assignee to the step if certain conditions are met.

Parameters

$args
An assignee key or array containing the id, type and editable_fields (if applicable).
public
# remove_assignee( Gravity_Flow_Assignee|boolean $assignee = false )

Removes assignee from the step. This is only used for maintenance when the assignee settings change.

Removes assignee from the step. This is only used for maintenance when the assignee settings change.

Parameters

$assignee
The assignee properties.
public string|boolean|WP_Error
# maybe_process_status_update( array $form, array $entry )

Handles POSTed values from the workflow detail page.

Handles POSTed values from the workflow detail page.

Parameters

$form
The current form.
$entry
The current entry.

Returns

string|boolean|WP_Error
Return a success feedback message safe for page output or a WP_Error instance with an error.
public
# workflow_detail_status_box( array $form )

Displays content inside the Workflow metabox on the workflow detail page.

Displays content inside the Workflow metabox on the workflow detail page.

Deprecated

since 1.3.2

Parameters

$form
The Form array which may contain validation details.
public
# workflow_detail_box( array $form, array $args )

Displays content inside the Workflow metabox on the workflow detail page.

Displays content inside the Workflow metabox on the workflow detail page.

Parameters

$form
The Form array which may contain validation details.
$args
Additional args which may affect the display.
public
# entry_detail_status_box( array $form )

Displays content inside the Workflow metabox on the Gravity Forms Entry Detail page.

Displays content inside the Workflow metabox on the Gravity Forms Entry Detail page.

Parameters

$form
The current form.
public array
# get_editable_fields( )

Override to return an array of editable fields for the current user.

Override to return an array of editable fields for the current user.

Returns

array
public
# maybe_send_notification( string $type )

Send the applicable notification if it is enabled and has assignees.

Send the applicable notification if it is enabled and has assignees.

Parameters

$type
The type of notification currently being processed; approval or rejection.
public
# send_notification( array $notification )

Sends an email.

Sends an email.

Parameters

$notification
The notification properties.
public array
# gpdf_add_notification_attachment( array $notification, string $gpdf_id )

If Gravity PDF is enabled we'll generate the appropriate PDF and attach it to the current notification

If Gravity PDF is enabled we'll generate the appropriate PDF and attach it to the current notification

Parameters

$notification
The notification array currently being sent.
$gpdf_id
The Gravity PDF ID.

Returns

array
public
# end( )

Ends the step cleanly and wraps up loose ends. Sets the next step. Deletes assignee status entry meta.

Ends the step cleanly and wraps up loose ends. Sets the next step. Deletes assignee status entry meta.

public boolean
# can_set_workflow_status( )

Returns TRUE if this step can alter the current and final status. If the only status option available for this step is 'complete' then, by default, the step will not set the status. The default final status for the workflow is 'complete'.

Returns TRUE if this step can alter the current and final status. If the only status option available for this step is 'complete' then, by default, the step will not set the status. The default final status for the workflow is 'complete'.

Returns

boolean
public boolean
# is_complete( )

Override this method to check whether the step is complete in interactive and long running steps.

Override this method to check whether the step is complete in interactive and long running steps.

Returns

boolean
public
# add_note( string $note, boolean $is_user_event = false, boolean $deprecated = false )

Adds a note to the timeline. The timeline is a filtered subset of the Gravity Forms Entry notes.

Adds a note to the timeline. The timeline is a filtered subset of the Gravity Forms Entry notes.

Parameters

$note
The note to be added.
$is_user_event
Formerly $user_id; as of 1.7.1-dev indicates if the current note is the result of an assignee action.
$deprecated
Formerly $user_name; no longer used as of 1.7.1-dev.

Since

1.7.1-dev Updated to store notes in the entry meta.
unknown
public string
# maybe_add_user_note( )

Adds a user submitted note.

Adds a user submitted note.

Returns

string
The user note which was added or an empty string.

Since

1.7.1-dev
public boolean
# evaluate_routing_rule( array $routing_rule )

Evaluates a routing rule.

Evaluates a routing rule.

Parameters

$routing_rule
The routing rule properties.

Returns

boolean
Is the routing rule a match?
public
# send_notifications( Gravity_Flow_Assignee[] $assignees, array $notification )

Sends a notification to an array of assignees.

Sends a notification to an array of assignees.

Parameters

$assignees
The assignee properties.
$notification
The notification properties.
public integer|mixed
# entry_count( )

Returns the number of entries on this step.

Returns the number of entries on this step.

Returns

integer|mixed
public
# log_debug( string $message )

Logs debug messages to the Gravity Flow log file generated by the Gravity Forms Logging Add-On.

Logs debug messages to the Gravity Flow log file generated by the Gravity Forms Logging Add-On.

Parameters

$message
The message to be logged.
public array
# get_feed_meta( )

Retrieves the feed meta for the current step.

Retrieves the feed meta for the current step.

Returns

array
public boolean|WP_Error
# maybe_process_token_action( array $action, array $token, array $form, array $entry )

Process token action if conditions are satisfied.

Process token action if conditions are satisfied.

Parameters

$action
The action properties.
$token
The assignee token properties.
$form
The current form.
$entry
The current entry.

Returns

boolean|WP_Error
Return a success feedback message safe for page output or false.
public
# log_event( string $step_event, string $step_status = '', integer $duration = 0 )

Add a new event to the activity log.

Add a new event to the activity log.

Parameters

$step_event
The event name.
$step_status
The step status.
$duration
The duration in seconds, if any.
public boolean
# supports_expiration( )

Override to indicate if the current step supports expiration.

Override to indicate if the current step supports expiration.

Returns

boolean
public array|mixed|string
# get_setting( string $setting )

Returns the correct value for the step setting for the current context - either step settings or step processing.

Returns the correct value for the step setting for the current context - either step settings or step processing.

Parameters

$setting
The setting key.

Returns

array|mixed|string
public string|boolean
# process_assignee_status( Gravity_Flow_Assignee $assignee, string $new_status, array $form )

Process a status change for an assignee.

Process a status change for an assignee.

Parameters

$assignee
The assignee properties.
$new_status
The assignee status.
$form
The current form.

Returns

string|boolean
Return a success feedback message safe for page output or false.
public boolean
# is_assignee( string $assignee_key )

Determines if the supplied assignee key belongs to one of the steps assignees.

Determines if the supplied assignee key belongs to one of the steps assignees.

Parameters

$assignee_key
The assignee key.

Returns

boolean
public
# maybe_adjust_assignment( Gravity_Flow_Assignee[] $previous_assignees )

Removes assignees from and/or adds assignees to a step. Call after updating entry values. Make sure you call get_assignees() to get the assignees before you update the entry before you update the entry or the previous assignees may not get removed.

Removes assignees from and/or adds assignees to a step. Call after updating entry values. Make sure you call get_assignees() to get the assignees before you update the entry before you update the entry or the previous assignees may not get removed.

Parameters

$previous_assignees
The previous assignees.
public
# restart_action( )

Override this to perform any tasks for the current step when restarting the workflow or step, such as cleaning up custom entry meta.

Override this to perform any tasks for the current step when restarting the workflow or step, such as cleaning up custom entry meta.

public boolean
# validate_note( string $new_status, array & $form )

Determine if the note is valid and update the form with the result.

Determine if the note is valid and update the form with the result.

Parameters

$new_status
The new status for the current step.
$form
The form currently being processed.

Returns

boolean
public boolean
# validate_note_mode( string $new_status, string $note )

Override this with the validation logic to determine if the submitted note for this step is valid.

Override this with the validation logic to determine if the submitted note for this step is valid.

Parameters

$new_status
The new status for the current step.
$note
The submitted note.

Returns

boolean
public array|boolean|WP_Error
# get_validation_result( boolean $valid, array $form, string $new_status )

Get the validation result for this step.

Get the validation result for this step.

Parameters

$valid
The steps current validation state.
$form
The form currently being processed.
$new_status
The new status for the current step.

Returns

array|boolean|WP_Error
public array
# maybe_filter_validation_result( array $validation_result, string $new_status )

Override this to implement a custom filter for this steps validation result.

Override this to implement a custom filter for this steps validation result.

Parameters

$validation_result
The validation result and form currently being processed.
$new_status
The new status for the current step.

Returns

array
public
# purge_assignees( )

Purges assignees from the database.

Purges assignees from the database.

Since

2.1.2
Properties summary
protected Gravity_Flow_Assignee[] $_assignees

The assignees for this step.

The assignees for this step.

Since

1.8.1
# array()
protected string $_step_type

A unique key for this step type. This property must be overridden by extending classes.

A unique key for this step type. This property must be overridden by extending classes.

#
protected integer|string $_next_step_id

The next step. This could be either a step ID (integer) or one of the following: - next - complete

The next step. This could be either a step ID (integer) or one of the following: - next - complete

#
protected string $_rest_base

The resource slug for the REST API.

The resource slug for the REST API.

This should be a plural noun.

e.g. approvals

# null
Gravity Flow API documentation generated by ApiGen