You are here

public function BrightcoveSubscription::setStatus in Brightcove Video Connect 8.2

Same name and namespace in other branches
  1. 8 src/Entity/BrightcoveSubscription.php \Drupal\brightcove\Entity\BrightcoveSubscription::setStatus()
  2. 3.x src/Entity/BrightcoveSubscription.php \Drupal\brightcove\Entity\BrightcoveSubscription::setStatus()

Set the entity's status.

Parameters

bool $status: TRUE if enabled, FALSE if disabled.

Return value

$this

Overrides BrightcoveSubscriptionInterface::setStatus

2 calls to BrightcoveSubscription::setStatus()
BrightcoveSubscription::deleteFromBrightcove in src/Entity/BrightcoveSubscription.php
Delete the Subscription from Brightcove only.
BrightcoveSubscription::saveToBrightcove in src/Entity/BrightcoveSubscription.php
Saves the subscription entity to Brightcove.

File

src/Entity/BrightcoveSubscription.php, line 166

Class

BrightcoveSubscription
Defines the Brightcove Subscription entity.

Namespace

Drupal\brightcove\Entity

Code

public function setStatus($status) {
  if ($this->default) {
    $this->status = $status;
    return $this;
  }
  throw new \Exception('Not possible to set status of a non-default Subscription.');
}