raoul2000\workflow\base\Status::__construct PHP Method

__construct() public method

To create a Status you must provide following values in the $config array passed as argument: - **id** : the id for this status. - **workflowId ** : the id of the workflow this status belongs to. Following values are optional : - **label** : human readable name for this status.
public __construct ( array $config = [] )
$config array
    public function __construct($config = [])
    {
        if (!empty($config['workflowId'])) {
            $this->_workflow_id = $config['workflowId'];
            unset($config['workflowId']);
        } else {
            throw new InvalidConfigException('missing workflow id');
        }
        if (!empty($config['id'])) {
            $this->_id = $config['id'];
            unset($config['id']);
        } else {
            throw new InvalidConfigException('missing status id');
        }
        if (!empty($config['label'])) {
            $this->_label = $config['label'];
            unset($config['label']);
        }
        parent::__construct($config);
    }