function MediaFilterController::formatUsesMediaEmbedFilter
Same name in other branches
- 9 core/modules/media/src/Controller/MediaFilterController.php \Drupal\media\Controller\MediaFilterController::formatUsesMediaEmbedFilter()
- 10 core/modules/media/src/Controller/MediaFilterController.php \Drupal\media\Controller\MediaFilterController::formatUsesMediaEmbedFilter()
- 11.x core/modules/media/src/Controller/MediaFilterController.php \Drupal\media\Controller\MediaFilterController::formatUsesMediaEmbedFilter()
Checks access based on media_embed filter status on the text format.
Parameters
\Drupal\filter\FilterFormatInterface $filter_format: The text format for which to check access.
Return value
\Drupal\Core\Access\AccessResultInterface The access result.
1 string reference to 'MediaFilterController::formatUsesMediaEmbedFilter'
- media.routing.yml in core/
modules/ media/ media.routing.yml - core/modules/media/media.routing.yml
File
-
core/
modules/ media/ src/ Controller/ MediaFilterController.php, line 141
Class
- MediaFilterController
- Controller which renders a preview of the provided text.
Namespace
Drupal\media\ControllerCode
public static function formatUsesMediaEmbedFilter(FilterFormatInterface $filter_format) {
$filters = $filter_format->filters();
return AccessResult::allowedIf($filters->has('media_embed') && $filters->get('media_embed')->status)
->addCacheableDependency($filter_format);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.