You are here

interface InputMatchInterface in Lightning Media 8

Same name and namespace in other branches
  1. 8.4 src/InputMatchInterface.php \Drupal\lightning_media\InputMatchInterface
  2. 8.2 src/InputMatchInterface.php \Drupal\lightning_media\InputMatchInterface
  3. 8.3 src/InputMatchInterface.php \Drupal\lightning_media\InputMatchInterface

An interface for media type plugins to tell if they can handle mixed input.

Hierarchy

Expanded class hierarchy of InputMatchInterface

All classes that implement InputMatchInterface

5 files declare their use of InputMatchInterface
File.php in modules/lightning_media_document/src/Plugin/media/Source/File.php
Image.php in modules/lightning_media_image/src/Plugin/media/Source/Image.php
Instagram.php in modules/lightning_media_instagram/src/Plugin/media/Source/Instagram.php
Twitter.php in modules/lightning_media_twitter/src/Plugin/media/Source/Twitter.php
Video.php in modules/lightning_media_video/src/Plugin/media/Source/Video.php

File

src/InputMatchInterface.php, line 10

Namespace

Drupal\lightning_media
View source
interface InputMatchInterface {

  /**
   * Checks if this media type can handle a given input value.
   *
   * @param mixed $value
   *   The input value.
   * @param \Drupal\media\MediaTypeInterface $bundle
   *   The media bundle that is using this plugin.
   *
   * @return bool
   *   TRUE if the input can be handled by this plugin, FALSE otherwise.
   */
  public function appliesTo($value, MediaTypeInterface $bundle);

}

Members

Namesort descending Modifiers Type Description Overrides
InputMatchInterface::appliesTo public function Checks if this media type can handle a given input value. 1