You are here

public static function MockProvider::isApplicable in Video Embed Field 8.2

Same name and namespace in other branches
  1. 8 tests/modules/video_embed_field_mock_provider/src/Plugin/video_embed_field/Provider/MockProvider.php \Drupal\video_embed_field_mock_provider\Plugin\video_embed_field\Provider\MockProvider::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

File

tests/modules/video_embed_field_mock_provider/src/Plugin/video_embed_field/Provider/MockProvider.php, line 20

Class

MockProvider
A mock video provider for use in tests.

Namespace

Drupal\video_embed_field_mock_provider\Plugin\video_embed_field\Provider

Code

public static function isApplicable($input) {
  return strpos($input, 'example.com') !== FALSE;
}