You are here

interface MediaSelectionProcessorManagerInterface in Gutenberg 8

Same name and namespace in other branches
  1. 8.2 src/MediaSelectionProcessor/MediaSelectionProcessorManagerInterface.php \Drupal\gutenberg\MediaSelectionProcessor\MediaSelectionProcessorManagerInterface

Provides contract for media selection processor manager.

@package Drupal\gutenberg\MediaSelectionProcessor

Hierarchy

Expanded class hierarchy of MediaSelectionProcessorManagerInterface

All classes that implement MediaSelectionProcessorManagerInterface

1 file declares its use of MediaSelectionProcessorManagerInterface
MediaController.php in src/Controller/MediaController.php

File

src/MediaSelectionProcessor/MediaSelectionProcessorManagerInterface.php, line 10

Namespace

Drupal\gutenberg\MediaSelectionProcessor
View source
interface MediaSelectionProcessorManagerInterface {

  /**
   * Register media selection processor.
   *
   * @param \Drupal\gutenberg\MediaSelectionProcessor\MediaSelectionProcessorInterface $processor
   *   Media selection processor instance.
   * @param \Drupal\gutenberg\MediaSelectionProcessor\string $processor_name
   *   Processor name.
   */
  public function registerProcessor(MediaSelectionProcessorInterface $processor, string $processor_name);

  /**
   * Process media selection data by provided processor.
   *
   * @param string $processor_name
   *   Processor name.
   * @param array $data
   *   Data to process.
   *
   * @return mixed
   *   The processed media selection data.
   */
  public function process(string $processor_name, array $data);

  /**
   * Process selection data.
   *
   * If numeric string is provided, default processor will be fired.
   *
   * @param string $data
   *   Serialized data to process.
   *
   * @return \Drupal\media\MediaInterface[]
   *   List of media entities.
   */
  public function processData(string $data);

}

Members

Namesort descending Modifiers Type Description Overrides
MediaSelectionProcessorManagerInterface::process public function Process media selection data by provided processor. 1
MediaSelectionProcessorManagerInterface::processData public function Process selection data. 1
MediaSelectionProcessorManagerInterface::registerProcessor public function Register media selection processor. 1