protected function EntityFormProxy::isAllowedType in Lightning Media 8.4
Same name and namespace in other branches
- 8.3 src/Plugin/EntityBrowser/Widget/EntityFormProxy.php \Drupal\lightning_media\Plugin\EntityBrowser\Widget\EntityFormProxy::isAllowedType()
Tests if a media type can be used by this widget.
Parameters
\Drupal\media\MediaTypeInterface $media_type: The media type.
Return value
bool TRUE if the media type can be used, FALSE otherwise.
1 call to EntityFormProxy::isAllowedType()
- FileUpload::isAllowedType in src/
Plugin/ EntityBrowser/ Widget/ FileUpload.php - Tests if a media type can be used by this widget.
1 method overrides EntityFormProxy::isAllowedType()
- FileUpload::isAllowedType in src/
Plugin/ EntityBrowser/ Widget/ FileUpload.php - Tests if a media type can be used by this widget.
File
- src/
Plugin/ EntityBrowser/ Widget/ EntityFormProxy.php, line 255
Class
- EntityFormProxy
- Base class for EB widgets which wrap around an (inline) entity form.
Namespace
Drupal\lightning_media\Plugin\EntityBrowser\WidgetCode
protected function isAllowedType(MediaTypeInterface $media_type) {
return $this->entityTypeManager
->getAccessControlHandler('media')
->createAccess($media_type
->id());
}