You are here

public function WorkflowState::save in Workflow 7.2

Same name and namespace in other branches
  1. 7 includes/Entity/WorkflowState.php \WorkflowState::save()

Permanently saves the entity.

Overrides Entity::save

See also

entity_save()

1 call to WorkflowState::save()
WorkflowState::deactivate in includes/Entity/WorkflowState.php
Deactivate a Workflow State, moving existing nodes to a given State.

File

includes/Entity/WorkflowState.php, line 548
Contains workflow\includes\Entity\WorkflowState. Contains workflow\includes\Entity\WorkflowStateController.

Class

WorkflowState
Class WorkflowState

Code

public function save() {
  parent::save();

  // Ensure Workflow is marked overridden.
  $workflow = $this
    ->getWorkflow();
  if ($workflow->status == ENTITY_IN_CODE) {
    $workflow->status = ENTITY_OVERRIDDEN;
    $workflow
      ->save();
  }
}