public function Subscription::getList in Mailing List 8
Gets the mailing list to which this subscription belongs.
Return value
\Drupal\mailing_list\MailingListInterface The mailing list.
Overrides SubscriptionInterface::getList
1 call to Subscription::getList()
- Subscription::preSave in src/
Entity/ Subscription.php - Acts on an entity before the presave hook is invoked.
File
- src/
Entity/ Subscription.php, line 80
Class
- Subscription
- Defines the subscription entity class.
Namespace
Drupal\mailing_list\EntityCode
public function getList() {
return $this
->entityTypeManager()
->getStorage('mailing_list')
->load($this
->getListId());
}