You are here

interface FormComponentInterface in Flexiform 8

Interface for form component plugins.

Hierarchy

Expanded class hierarchy of FormComponentInterface

All classes that implement FormComponentInterface

File

src/FormComponent/FormComponentInterface.php, line 11

Namespace

Drupal\flexiform\FormComponent
View source
interface FormComponentInterface {

  /**
   * Render the element.
   *
   * @param array $form
   *   The form array.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   * @param \Drupal\Core\Render\RendererInterface $renderer
   *   The form renderer for setting cacheability metadata.
   */
  public function render(array &$form, FormStateInterface $form_state, RendererInterface $renderer);

  /**
   * Extract the form values.
   *
   * @param array $form
   *   The section of the form corresponding to this component.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   */
  public function extractFormValues(array $form, FormStateInterface $form_state);

  /**
   * Get the settings form.
   *
   * @param array $form
   *   The form array.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The form state.
   */
  public function settingsForm(array $form, FormStateInterface $form_state);

  /**
   * Get the settings summary.
   *
   * @return string
   *   The setting summary.
   */
  public function settingsSummary();

  /**
   * Get the admin label for the component.
   *
   * @return string
   *   The administrative label for the component.
   */
  public function getAdminLabel();

}

Members

Namesort descending Modifiers Type Description Overrides
FormComponentInterface::extractFormValues public function Extract the form values. 4
FormComponentInterface::getAdminLabel public function Get the admin label for the component. 1
FormComponentInterface::render public function Render the element. 4
FormComponentInterface::settingsForm public function Get the settings form. 1
FormComponentInterface::settingsSummary public function Get the settings summary. 1