You are here

public function MediaFinderBase::applies in Group Media 8.2

Checks if the plugin can be applied.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity in question.

Return value

bool TRUE if can be applied, FALSE in other case.

Overrides MediaFinderInterface::applies

File

src/Plugin/MediaFinder/MediaFinderBase.php, line 67

Class

MediaFinderBase
Class MediaFinderBase.

Namespace

Drupal\groupmedia\Plugin\MediaFinder

Code

public function applies(EntityInterface $entity) {
  if ($entity instanceof FieldableEntityInterface) {
    return TRUE;
  }
  return FALSE;
}