You are here

public function SubscriptionsFormBase::form in Simplenews 3.x

Same name and namespace in other branches
  1. 8.2 src/Form/SubscriptionsFormBase.php \Drupal\simplenews\Form\SubscriptionsFormBase::form()
  2. 8 src/Form/SubscriptionsFormBase.php \Drupal\simplenews\Form\SubscriptionsFormBase::form()

Gets the actual form array to be built.

Overrides ContentEntityForm::form

See also

\Drupal\Core\Entity\EntityForm::processForm()

\Drupal\Core\Entity\EntityForm::afterBuild()

3 calls to SubscriptionsFormBase::form()
SubscriberForm::form in src/Form/SubscriberForm.php
Gets the actual form array to be built.
SubscriptionsBlockForm::form in src/Form/SubscriptionsBlockForm.php
Gets the actual form array to be built.
SubscriptionsPageForm::form in src/Form/SubscriptionsPageForm.php
Gets the actual form array to be built.
3 methods override SubscriptionsFormBase::form()
SubscriberForm::form in src/Form/SubscriberForm.php
Gets the actual form array to be built.
SubscriptionsBlockForm::form in src/Form/SubscriptionsBlockForm.php
Gets the actual form array to be built.
SubscriptionsPageForm::form in src/Form/SubscriptionsPageForm.php
Gets the actual form array to be built.

File

src/Form/SubscriptionsFormBase.php, line 110

Class

SubscriptionsFormBase
Entity form for Subscriber with common routines.

Namespace

Drupal\simplenews\Form

Code

public function form(array $form, FormStateInterface $form_state) {
  $this
    ->getSubscriptionWidget($form_state)
    ->setAvailableNewsletterIds(array_keys($this
    ->getNewsletters()));
  return parent::form($form, $form_state);
}