public static function MediaHelper::isPreviewable in Varbase Media 9.0.x
Same name and namespace in other branches
- 8.7 modules/entity_browser_generic_embed/src/MediaHelper.php \Drupal\entity_browser_generic_embed\MediaHelper::isPreviewable()
- 8.5 modules/entity_browser_generic_embed/src/MediaHelper.php \Drupal\entity_browser_generic_embed\MediaHelper::isPreviewable()
- 8.6 modules/entity_browser_generic_embed/src/MediaHelper.php \Drupal\entity_browser_generic_embed\MediaHelper::isPreviewable()
Indicates if the media entity's type plugin supports dynamic previews.
Parameters
\Drupal\media\MediaInterface $entity: The media entity.
Return value
bool TRUE if dynamic previews are supported, FALSE otherwise.
2 calls to MediaHelper::isPreviewable()
- entity_browser_generic_embed_inline_entity_form_entity_form_alter in modules/
entity_browser_generic_embed/ entity_browser_generic_embed.module - Implements hook_inline_entity_form_entity_form_alter().
- MediaForm::form in modules/
entity_browser_generic_embed/ src/ Form/ MediaForm.php - Gets the actual form array to be built.
File
- modules/
entity_browser_generic_embed/ src/ MediaHelper.php, line 214
Class
- MediaHelper
- Provides helper methods for dealing with media entities.
Namespace
Drupal\entity_browser_generic_embedCode
public static function isPreviewable(MediaInterface $entity) {
$plugin_definition = $entity
->getSource()
->getPluginDefinition();
return isset($plugin_definition['preview']);
}