You are here

public static function ProviderPluginBase::isApplicable in Video Embed Field 8

Same name and namespace in other branches
  1. 8.2 src/ProviderPluginBase.php \Drupal\video_embed_field\ProviderPluginBase::isApplicable()

Check if the plugin is applicable to the user input.

Parameters

string $input: User input to check if it's a URL for the given provider.

Return value

bool If the plugin works for the given URL.

Overrides ProviderPluginInterface::isApplicable

1 call to ProviderPluginBase::isApplicable()
ProviderPluginBase::__construct in src/ProviderPluginBase.php
Create a plugin with the given input.

File

src/ProviderPluginBase.php, line 109

Class

ProviderPluginBase
A base for the provider plugins.

Namespace

Drupal\video_embed_field

Code

public static function isApplicable($input) {
  $id = static::getIdFromInput($input);
  return !empty($id);
}