MediaTestOembedHooks.php

Namespace

Drupal\media_test_oembed\Hook

File

core/modules/media/tests/modules/media_test_oembed/src/Hook/MediaTestOembedHooks.php

View source
<?php

declare (strict_types=1);
namespace Drupal\media_test_oembed\Hook;

use Drupal\media\OEmbed\Provider;
use Drupal\Core\Hook\Attribute\Hook;

/**
 * Hook implementations for media_test_oembed.
 */
class MediaTestOembedHooks {
    
    /**
     * Implements hook_oembed_resource_url_alter().
     */
    public function oembedResourceUrlAlter(array &$parsed_url, Provider $provider) {
        if ($provider->getName() === 'Vimeo') {
            $parsed_url['query']['altered'] = 1;
        }
    }

}

Classes

Title Deprecated Summary
MediaTestOembedHooks Hook implementations for media_test_oembed.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.