You are here

public function Subscription::getState in Commerce Recurring Framework 8

Gets the subscription state.

Return value

\Drupal\state_machine\Plugin\Field\FieldType\StateItemInterface The subscription state.

Overrides SubscriptionInterface::getState

File

src/Entity/Subscription.php, line 276

Class

Subscription
Defines the subscription entity.

Namespace

Drupal\commerce_recurring\Entity

Code

public function getState() {
  return $this
    ->get('state')
    ->first();
}