Pantheon\Terminus\Models\Site::getWorkflows PHP Method

getWorkflows() public method

public getWorkflows ( ) : Workflows
return Pantheon\Terminus\Collections\Workflows
    public function getWorkflows()
    {
        if (empty($this->workflows)) {
            $this->workflows = $this->getContainer()->get(Workflows::class, [['site' => $this]]);
        }
        return $this->workflows;
    }

Usage Example

 /**
  * Changes the role of the given member
  *
  * @param string $role Desired role for this organization
  * @return Workflow
  */
 public function setRole($role)
 {
     $workflow = $this->site->getWorkflows()->create('update_site_organization_membership', ['params' => ['organization_id' => $this->id, 'role' => $role]]);
     return $workflow;
 }
All Usage Examples Of Pantheon\Terminus\Models\Site::getWorkflows