PHP Class Pantheon\Terminus\Collections\OrganizationSiteMemberships

Inheritance: extends TerminusCollection
Show file Open project: pantheon-systems/terminus Class Usage Examples

Public Properties

Property Type Description
$organization Pantheon\Terminus\Models\Organization

Protected Properties

Property Type Description
$collected_class string
$paged boolean

Public Methods

Method Description
__construct ( array $options = [] ) : OrganizationSiteMemberships Instantiates the collection
create ( Site $site ) : Workflow Adds a site to this organization
get ( string $id ) : OrganizationSiteMembership Retrieves the model with site of the given UUID or name
getOrganization ( ) : Organization
getSite ( string $site_id ) : Site Retrieves the matching site from model members
siteIsMember ( Site $site ) : boolean Determines whether a site is a member of this collection

Method Details

__construct() public method

Instantiates the collection
public __construct ( array $options = [] ) : OrganizationSiteMemberships
$options array To be set
return OrganizationSiteMemberships

create() public method

Adds a site to this organization
public create ( Site $site ) : Workflow
$site Site Site object of site to add to this organization
return Workflow

get() public method

Retrieves the model with site of the given UUID or name
public get ( string $id ) : OrganizationSiteMembership
$id string UUID or name of desired site membership instance
return OrganizationSiteMembership

getOrganization() public method

public getOrganization ( ) : Organization
return Pantheon\Terminus\Models\Organization

getSite() public method

Retrieves the matching site from model members
public getSite ( string $site_id ) : Site
$site_id string ID or name of desired site
return Site $membership->site

siteIsMember() public method

Determines whether a site is a member of this collection
public siteIsMember ( Site $site ) : boolean
$site Site Site to determine membership of
return boolean

Property Details

$collected_class protected property

protected string $collected_class
return string

$organization public property

public Organization,Pantheon\Terminus\Models $organization
return Pantheon\Terminus\Models\Organization

$paged protected property

protected bool $paged
return boolean