You are here

public function MailchimpCampaignSendForm::afterBuild in Mailchimp 2.x

Same name and namespace in other branches
  1. 8 modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php \Drupal\mailchimp_campaign\Form\MailchimpCampaignSendForm::afterBuild()

// TODO: Make sure override afterBuild is the correct solution.

Have to disable EntityForm::afterbuild for this form. Drupal was attempting to get a field definition for the submit button from the MailchimpCampaign entity, which doesn't (and shouldn't) have it.

Overrides EntityForm::afterBuild

File

modules/mailchimp_campaign/src/Form/MailchimpCampaignSendForm.php, line 94

Class

MailchimpCampaignSendForm
Form controller for the MailchimpCampaign send campaign form.

Namespace

Drupal\mailchimp_campaign\Form

Code

public function afterBuild(array $element, FormStateInterface $form_state) {
  return $element;
}