Skip to content

Commit

Permalink
Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sara McCutcheon committed Aug 25, 2016
1 parent d52f3cb commit 3c81472
Show file tree
Hide file tree
Showing 16 changed files with 237 additions and 128 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
#Change Log
All notable changes to this project starting with the 0.6.0 release will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org)

## MASTER
### [0.12.0] - 2016-08-24
### Added
- Added `choices` property to `InputHelper::siteName` parameter object. (#1152)

### Changed
- Renamed `Sites::addSite` to `Sites::create`. (#1152)
- Renamed `OrganizationUserMemberships::addMember` to `OrganizationUserMemberships::create`. (#1152)
- When using the sites collection to gather all sites, you now must use `Sites::fetch()` to retrieve the relevant objects. (#1152)
- Renamed `OrganizationSiteMembership::removeMember` to `OrganizationSiteMembership::delete`. (#1152)

### Removed
- `cli cache-clear` command. (#1152)
- The command `site set-php-version` has been removed. Please set your PHP version by your pantheon.yml file. (See: https://pantheon.io/docs/php-versions) (#1121)

Expand Down
7 changes: 4 additions & 3 deletions docs/Helpers/InputHelper.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,10 @@

##### Parameters:
[array] $arg_options Elements as follow:
-array args The args passed in from argv
-string key Args key to search for
-string message Prompt for STDOUT
-array args The args passed in from argv
-Site[] choices An array of sites to use as options
-string key Args key to search for
-string message Prompt for STDOUT

##### Return:
[string] Site name
Expand Down
52 changes: 46 additions & 6 deletions docs/Models/Collections/OrganizationSiteMemberships.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
# Terminus\Models\Collections\OrganizationSiteMemberships

### addMember
### __construct
##### Description:
Instantiates the collection

##### Parameters:
[array] $options To be set

##### Return:
[OrganizationSiteMemberships]

---

### add
##### Description:
Adds a model to this collection

##### Parameters:
[object] $model_data Data to feed into attributes of new model
[array] $arg_options Data to make properties of the new model

##### Return:
[void]

---

### create
##### Description:
Adds a site to this organization

Expand All @@ -20,19 +45,34 @@
[string] $id UUID or name of desired site membership instance

##### Return:
[Site]
[OrganizationSiteMembership]

---

### fetch
### getSite
##### Description:
Fetches model data from API and instantiates its model instances
Retrieves the matching site from model members

##### Parameters:
[array] $options params to pass to url request
[string] $site_id ID or name of desired site

##### Return:
[OrganizationSiteMemberships]
[Site] $site

##### Throws:
TerminusException

---

### siteIsMember
##### Description:
Determines whether a site is a member of this collection

##### Parameters:
[Site] $site Site to determine membership of

##### Return:
[bool]

---

36 changes: 23 additions & 13 deletions docs/Models/Collections/OrganizationUserMemberships.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
# Terminus\Models\Collections\OrganizationUserMemberships

### addMember
### __construct
##### Description:
Instantiates the collection, sets param members as properties

##### Parameters:
[array] $options To be set to $this->key

---

### add
##### Description:
Adds a model to this collection

##### Parameters:
[object] $model_data Data to feed into attributes of new model
[array] $arg_options Data to make properties of the new model

##### Return:
[void]

---

### create
##### Description:
Adds a user to this organization

Expand Down Expand Up @@ -28,15 +50,3 @@

---

### fetch
##### Description:
Fetches model data from API and instantiates its model instances

##### Parameters:
[array] $options params to pass to url request

##### Return:
[OrganizationUserMemberships]

---

56 changes: 32 additions & 24 deletions docs/Models/Collections/Sites.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@

---

### addSite
### all
##### Description:
Retrieves all sites

##### Return:
[Site[]]

---

### create
##### Description:
Creates a new site

Expand All @@ -29,56 +38,52 @@

---

### addSiteToCache
### fetch
##### Description:
Adds site with given site ID to cache
Fetches model data from API and instantiates its model instances

##### Parameters:
[string] $site_id UUID of site to add to cache
[string] $org_id UUID of org to which new site belongs
[array] $arg_options params to pass to url request

##### Return:
[Site] The newly created site object
[Sites]

---

### deleteSiteFromCache
### filterByTag
##### Description:
Removes site with given site ID from cache
Filters sites list by tag

##### Parameters:
[string] $site_name Name of site to remove from cache
[string] $tag Tag to filter by
[string] $org_id ID of an organization which has tagged sites

##### Return:
[void]
[Sites]

---

### fetch
### filterByName
##### Description:
Fetches model data from API and instantiates its model instances
Filters an array of sites by whether the user is an organizational member

##### Parameters:
[array] $options params to pass to url request
[string] $regex Non-delimited PHP regex to filter site names by

##### Return:
[Sites]

---

### filterAllByTag
### filterByOwner
##### Description:
Filters sites list by tag
Filters an array of sites by whether the user is an organizational member

##### Parameters:
[string] $tag Tag to filter by
[string] $org Organization which has tagged sites
[string] $owner_uuid UUID of the owning user to filter by

##### Return:
[Site[]]

##### Throws:
TerminusException
[Sites]

---

Expand Down Expand Up @@ -109,12 +114,15 @@

---

### rebuildCache
### nameIsTaken
##### Description:
Clears sites cache
Determines whether a given site name is taken or not.

##### Parameters:
[string] $name Name of the site to look up

##### Return:
[void]
[boolean]

---

26 changes: 21 additions & 5 deletions docs/Models/Collections/TerminusCollection.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,23 @@

---

### add
##### Description:
Adds a model to this collection

##### Parameters:
[object] $model_data Data to feed into attributes of new model
[array] $options Data to make properties of the new model

##### Return:
[TerminusModel]

---

### all
##### Description:
Retrieves all models
TODO: Remove automatic fetching and make fetches explicit

##### Return:
[TerminusModel[]]
Expand Down Expand Up @@ -54,16 +68,18 @@

---

### add
### listing
##### Description:
Adds a model to this collection
Returns an array of data where the keys are the attribute $key and the
values are the attribute $value

##### Parameters:
[object] $model_data Data to feed into attributes of new model
[array] $options Data to make properties of the new model
[string] $key Name of attribute to make array keys
[mixed] $value Name(s) of attribute(s) to comprise array values

##### Return:
[TerminusModel]
[array] Array rendered as requested
-$this->attribute->$key = $this->attribute->$value

---

Expand Down
20 changes: 12 additions & 8 deletions docs/Models/Collections/UserOrganizationMemberships.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,31 @@

---

### fetch
### add
##### Description:
Fetches model data from API and instantiates its model instances
Adds a model to this collection

##### Parameters:
[array] $options params to pass to url request
[object] $model_data Data to feed into attributes of new model
[array] $arg_options Data to make properties of the new model

##### Return:
[UserOrganizationMemberships]
[void]

---

### get
### getOrganization
##### Description:
Retrieves the model of the given ID
Retrieves the matching organization from model members

##### Parameters:
[string] $id ID or name of desired organization
[string] $org ID or name of desired organization

##### Return:
[UserOrganizationMembership] $model
[Organization] $organization

##### Throws:
TerminusException

---

24 changes: 24 additions & 0 deletions docs/Models/Collections/UserSiteMemberships.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Terminus\Models\Collections\UserSiteMemberships

### __construct
##### Description:
Instantiates the collection, sets param members as properties

##### Parameters:
[array] $options To be set to $this->key

---

### add
##### Description:
Adds a model to this collection

##### Parameters:
[object] $model_data Data to feed into attributes of new model
[array] $arg_options Data to make properties of the new model

##### Return:
[void]

---

Loading

0 comments on commit 3c81472

Please sign in to comment.