Pantheon\Terminus\Commands\Org\Site\RemoveCommand::remove PHP Method

remove() public method

Remove a site from an organization
public remove ( string $organization, string $site )
$organization string The name or UUID of the organization to remove a site from
$site string The UUID or name of the site to be removed from this organization
    public function remove($organization, $site)
    {
        $org = $this->session()->getUser()->getOrgMemberships()->get($organization)->getOrganization();
        $membership = $org->getSiteMemberships()->get($site);
        $workflow = $membership->delete();
        while (!$workflow->checkProgress()) {
            // @TODO: Remove Symfony progress bar to indicate that something is happening.
        }
        $this->log()->notice('{site} has been removed from the {org} organization.', ['site' => $membership->site->get('name'), 'org' => $org->get('profile')->name]);
    }
RemoveCommand