class TestMediaFilterController in Drupal 10
Same name and namespace in other branches
- 9 core/modules/media/tests/modules/media_test_embed/src/Controller/TestMediaFilterController.php \Drupal\media_test_embed\Controller\TestMediaFilterController
Controller to allow testing of error handling of Media Embed in text editors.
Hierarchy
- class \Drupal\media\Controller\MediaFilterController implements ContainerInjectionInterface
- class \Drupal\media_test_embed\Controller\TestMediaFilterController
Expanded class hierarchy of TestMediaFilterController
File
- core/
modules/ media/ tests/ modules/ media_test_embed/ src/ Controller/ TestMediaFilterController.php, line 13
Namespace
Drupal\media_test_embed\ControllerView source
class TestMediaFilterController extends MediaFilterController {
/**
* {@inheritdoc}
*/
public function preview(Request $request, FilterFormatInterface $filter_format) {
if (\Drupal::state()
->get('test_media_filter_controller_throw_error', FALSE)) {
throw new NotFoundHttpException();
}
return parent::preview($request, $filter_format);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MediaFilterController:: |
protected | property | The entity repository. | |
MediaFilterController:: |
protected | property | The media storage. | |
MediaFilterController:: |
protected | property | The renderer service. | |
MediaFilterController:: |
private static | function | Throws an AccessDeniedHttpException if the request fails CSRF validation. | |
MediaFilterController:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
MediaFilterController:: |
public static | function | Checks access based on media_embed filter status on the text format. | |
MediaFilterController:: |
public | function | Constructs an MediaFilterController instance. | |
TestMediaFilterController:: |
public | function |
Returns a HTML response containing a preview of the text after filtering. Overrides MediaFilterController:: |