interface MediaFinderInterface in Group Media 8.2
Interface MediaFinderInterface.
@package Drupal\groupmedia
Hierarchy
- interface \Drupal\groupmedia\MediaFinderInterface
Expanded class hierarchy of MediaFinderInterface
All classes that implement MediaFinderInterface
1 file declares its use of MediaFinderInterface
- MediaFinderBase.php in src/
Plugin/ MediaFinder/ MediaFinderBase.php
File
- src/
MediaFinderInterface.php, line 13
Namespace
Drupal\groupmediaView source
interface MediaFinderInterface {
/**
* Checks if the plugin can be applied.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity in question.
*
* @return bool
* TRUE if can be applied, FALSE in other case.
*/
public function applies(EntityInterface $entity);
/**
* Search for the attached media entities.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* Entity to search in.
*
* @return \Drupal\media\MediaInterface[]
* Found media items.
*/
public function process(EntityInterface $entity);
/**
* Returns the field types this plugin is capable of tracking.
*
* @return array
* An indexed array of field type names, as defined in the plugin's
* annotation under the key "field_types".
*/
public function getApplicableFieldTypes();
/**
* Checks whether media item should be considered as group content.
*
* @param \Drupal\media\MediaInterface $media
* Media item to check.
* @param \Drupal\Core\Entity\EntityInterface $entity
* Host entity.
* @param string $field_name
* The field name where the media was found.
*
* @return bool
* TRUE if item should be processed, FALSE is other case.
*/
public function shouldBeAdded(MediaInterface $media, EntityInterface $entity, $field_name);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MediaFinderInterface:: |
public | function | Checks if the plugin can be applied. | 1 |
MediaFinderInterface:: |
public | function | Returns the field types this plugin is capable of tracking. | 1 |
MediaFinderInterface:: |
public | function | Search for the attached media entities. | 2 |
MediaFinderInterface:: |
public | function | Checks whether media item should be considered as group content. | 1 |