You are here

interface FilefieldSourceInterface in FileField Sources 8

Provides an interface for file field source plugins.

Hierarchy

Expanded class hierarchy of FilefieldSourceInterface

All classes that implement FilefieldSourceInterface

See also

\Drupal\filefield_sources\FilefieldSourceManager

\Drupal\filefield_sources\Annotation\FilefieldSource

Plugin API

5 files declare their use of FilefieldSourceInterface
Attach.php in src/Plugin/FilefieldSource/Attach.php
Clipboard.php in src/Plugin/FilefieldSource/Clipboard.php
Imce.php in src/Plugin/FilefieldSource/Imce.php
Reference.php in src/Plugin/FilefieldSource/Reference.php
Remote.php in src/Plugin/FilefieldSource/Remote.php

File

src/FilefieldSourceInterface.php, line 16

Namespace

Drupal\filefield_sources
View source
interface FilefieldSourceInterface {

  /**
   * Value callback for file field source plugin.
   *
   * @param array $element
   *   An associative array containing the properties of the element.
   * @param mixed $input
   *   The incoming input to populate the form element. If this is FALSE,
   *   the element's default value should be returned.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current state of the form.
   *
   * @return mixed
   *   The value to assign to the element.
   */
  public static function value(array &$element, &$input, FormStateInterface $form_state);

  /**
   * Process callback for file field source plugin.
   *
   * @param array $element
   *   An associative array containing the properties and children of the
   *   generic input element.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The current state of the form.
   * @param array $complete_form
   *   The complete form structure.
   *
   * @return array
   *   The processed element.
   */
  public static function process(array &$element, FormStateInterface $form_state, array &$complete_form);

}

Members

Namesort descending Modifiers Type Description Overrides
FilefieldSourceInterface::process public static function Process callback for file field source plugin. 5
FilefieldSourceInterface::value public static function Value callback for file field source plugin. 5