Pantheon\Terminus\Models\Workflow::__construct PHP Method

__construct() public method

Object constructor
public __construct ( object $attributes = null, array $options = [] ) : Workflow
$attributes object Attributes of this model
$options array Options with which to configure this model
return Workflow
    public function __construct($attributes = null, array $options = [])
    {
        parent::__construct($attributes, $options);
        $this->owner = null;
        if (isset($options['collection'])) {
            $this->owner = $options['collection']->getOwnerObject();
        } elseif (isset($options['environment'])) {
            $this->owner = $options['environment'];
        } elseif (isset($options['organization'])) {
            $this->owner = $options['organization'];
        } elseif (isset($options['site'])) {
            $this->owner = $options['site'];
        } elseif (isset($options['user'])) {
            $this->owner = $options['user'];
        }
    }