You are here

public function Subscription::setState in Commerce Recurring Framework 8

Sets the subscription state.

Parameters

string $state_id: The new state ID.

Return value

$this

Overrides SubscriptionInterface::setState

File

src/Entity/Subscription.php, line 283

Class

Subscription
Defines the subscription entity.

Namespace

Drupal\commerce_recurring\Entity

Code

public function setState($state_id) {
  $this
    ->set('state', $state_id);
  return $this;
}