Back to WorkflowBehaviorTrait class

Method setUpWorkflow

public void
setUpWorkflow
(mixed $extension)
Set Up the workflow
Parameters
  • string $extension The option and section separated by.
Returns
  • void
Since
  • 4.0.0

Method setUpWorkflow - Source code

/**
 * Set Up the workflow
 *
 * @param   string  $extension  The option and section separated by.
 *
 * @return  void
 *
 * @since   4.0.0
 */
public function setUpWorkflow($extension)
{
    $parts = explode('.', $extension);
    $this->extension = array_shift($parts);
    if (count($parts)) {
        $this->section = array_shift($parts);
    }
    $this->workflow = new Workflow($extension);
    $params = ComponentHelper::getParams($this->extension);
    $this->workflowEnabled = $params->get('workflow_enabled');
    $this->enableWorkflowBatch();
}