Skip to content

Drupal\helper\Hook\MediaHooks

Media hooks for the Helper module.

Methods

Name Description
__construct MediaHooks constructor.
preprocessMediaOembedIframe Implements hook_preprocess_media_oembed_iframe().
setStringTranslation Sets the string translation service to use.

MediaHooks::__construct

Description

public __construct (\Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler)

MediaHooks constructor.

Parameters

  • (\Drupal\Core\Extension\ModuleHandlerInterface) $moduleHandler :
    The module handler.

Return Values

void


MediaHooks::preprocessMediaOembedIframe

Description

public preprocessMediaOembedIframe (void)

Implements hook_preprocess_media_oembed_iframe().

Ensures oEmbed iframes always have a title attribute.

Parameters

This function has no parameters.

Return Values

void


MediaHooks::setStringTranslation

Description

public setStringTranslation (\Drupal\Core\StringTranslation\TranslationInterface $translation)

Sets the string translation service to use.

Parameters

  • (\Drupal\Core\StringTranslation\TranslationInterface) $translation :
    The string translation service.

Return Values

$this