You are here

interface ResourceFieldEnhancerInterface in JSON:API Extras 8

Same name and namespace in other branches
  1. 8.3 src/Plugin/ResourceFieldEnhancerInterface.php \Drupal\jsonapi_extras\Plugin\ResourceFieldEnhancerInterface
  2. 8.2 src/Plugin/ResourceFieldEnhancerInterface.php \Drupal\jsonapi_extras\Plugin\ResourceFieldEnhancerInterface

Provides an interface defining a ResourceFieldEnhancer entity.

Hierarchy

Expanded class hierarchy of ResourceFieldEnhancerInterface

All classes that implement ResourceFieldEnhancerInterface

File

src/Plugin/ResourceFieldEnhancerInterface.php, line 10

Namespace

Drupal\jsonapi_extras\Plugin
View source
interface ResourceFieldEnhancerInterface extends ConfigurablePluginInterface {

  /**
   * Apply the last transformations to the output value of a single field.
   *
   * @param mixed $value
   *   The value to be processed after being prepared for output.
   *
   * @return mixed
   *   The value after being post processed.
   */
  public function postProcess($value);

  /**
   * Apply the initial transformations to the input value of a single field.
   *
   * @param mixed $value
   *   The value to be processed so it can be used as an input.
   *
   * @return mixed
   *   The value after being post precessed.
   */
  public function prepareForInput($value);

  /**
   * Get the JSON Schema for the new output.
   *
   * @return array
   *   An structured array representing the JSON Schema of the new output.
   */
  public function getJsonSchema();

  /**
   * Get a form element to render the settings.
   *
   * @param array $resource_field_info
   *   The resource field info.
   *
   * @return array
   *   The form element array.
   */
  public function getSettingsForm(array $resource_field_info);

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurablePluginInterface::defaultConfiguration public function Gets default configuration for this plugin. 1
ConfigurablePluginInterface::getConfiguration public function Gets this plugin's configuration. 1
ConfigurablePluginInterface::setConfiguration public function Sets the configuration for this plugin instance. 1
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 19
ResourceFieldEnhancerInterface::getJsonSchema public function Get the JSON Schema for the new output. 3
ResourceFieldEnhancerInterface::getSettingsForm public function Get a form element to render the settings. 1
ResourceFieldEnhancerInterface::postProcess public function Apply the last transformations to the output value of a single field. 3
ResourceFieldEnhancerInterface::prepareForInput public function Apply the initial transformations to the input value of a single field. 3