traitBuildConfigurationForm example

use BlockPluginTrait {
    buildConfigurationForm as traitBuildConfigurationForm;
  }
  use ContextAwarePluginTrait;
  use ContextAwarePluginAssignmentTrait;

  /** * {@inheritdoc} */
  public function buildConfigurationForm(array $form, FormStateInterface $form_state) {
    $form = $this->traitBuildConfigurationForm($form$form_state);

    // Add context mapping UI form elements.     $contexts = $form_state->getTemporaryValue('gathered_contexts') ?: [];
    $form['context_mapping'] = $this->addContextAssignmentElement($this$contexts);

    return $form;
  }

}
Home | Imprint | This part of the site doesn't use cookies.