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

getName() public method

Get the human-readable name of the site
public getName ( ) : mixed
return mixed
    public function getName()
    {
        return $this->get('name');
    }

Usage Example

 /**
  * Get model data as PropertyList
  *
  * @return PropertyList
  */
 public function serialize()
 {
     $organization = $this->getOrganizatio();
     $data = ['org_id' => $organization->id, 'org_name' => $organization->get('profile')->name, 'site_id' => $this->site->id, 'site_name' => $this->site->getName()];
     return $data;
 }