/**
* Get the workflow for a given ID
*
* @param int|null $workflowId ID of the workflow
*
* @return CMSObject|boolean Object on success, false on failure.
*
* @since 4.0.0
*/
protected function getWorkflow(int $workflowId = null)
{
$workflowId = !empty($workflowId) ? $workflowId : $this->app->input->getInt('workflow_id');
if (is_array($workflowId)) {
return false;
}
return $this->app->bootComponent('com_workflow')->getMVCFactory()->createModel('Workflow', 'Administrator', ['ignore_request' => true])->getItem($workflowId);
}