Error message

  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).

public function JobInterface::setState

Updates the state of the job.

Parameters

int $state: The new state of the job. Has to be one of the job state constants.

string $message: (optional) The log message to be saved along with the state change.

array $variables: (optional) An array of variables to replace in the message on display.

string $type: (optional) The message type.

Return value

int The updated state of the job if it could be set.

See also

Job::addMessage()

1 method overrides JobInterface::setState()
Job::setState in src/Entity/Job.php
Updates the state of the job.

File

src/JobInterface.php, line 363

Class

JobInterface
Interface for tmgmt_job entity.

Namespace

Drupal\tmgmt

Code

public function setState($state, $message = NULL, $variables = array(), $type = 'debug');