You are here

interface FormComponentTypeCreateableInterface in Flexiform 8

Interface for component types that are createable.

Component types that implement this interface can be defined in a repeatable custom fashion.

Hierarchy

Expanded class hierarchy of FormComponentTypeCreateableInterface

All classes that implement FormComponentTypeCreateableInterface

2 files declare their use of FormComponentTypeCreateableInterface
FormComponentAddLocalAction.php in src/Plugin/Deriver/FormComponentAddLocalAction.php
RouteSubscriber.php in src/Routing/RouteSubscriber.php

File

src/FormComponent/FormComponentTypeCreateableInterface.php, line 13

Namespace

Drupal\flexiform\FormComponent
View source
interface FormComponentTypeCreateableInterface extends FormComponentTypeInterface {

  /**
   * Get a form for adding a component of this type.
   *
   * @param array $form
   *   The part of the form array that should contain the component plugin
   *   settings.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   *
   * @return array
   *   A form array for setting the options of a component. Normally broken
   *   into settings and third_party_settings.
   */
  public function addComponentForm(array $form, FormStateInterface $form_state);

  /**
   * Validate the add component form.
   *
   * @param array $form
   *   The part of the form array that should contain the component plugin
   *   settings.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   */
  public function addComponentFormValidate(array $form, FormStateInterface $form_state);

  /**
   * Submit the add component options form.
   *
   * Make sure the desired options values are set to the same parents as the
   * supplied form element.
   *
   * @param array $form
   *   The part of the form array that should contain the component plugin
   *   settings.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   */
  public function addComponentFormSubmit(array $form, FormStateInterface $form_state);

}

Members

Namesort descending Modifiers Type Description Overrides
FormComponentTypeCreateableInterface::addComponentForm public function Get a form for adding a component of this type. 1
FormComponentTypeCreateableInterface::addComponentFormSubmit public function Submit the add component options form. 1
FormComponentTypeCreateableInterface::addComponentFormValidate public function Validate the add component form. 1
FormComponentTypeInterface::getComponent public function Get a component object. 1
FormComponentTypeInterface::getFormDisplay public function Get the form display. 1
FormComponentTypeInterface::getFormEntityManager public function Get the form entity manager. 1
FormComponentTypeInterface::setFormDisplay public function Set the form display. 1