class DefaultHtmlRouteProvider in farmOS 2.x
Deny access to the entity type add form.
New entity types of entities with bundle plugins cannot be created in the UI.
@See https://www.drupal.org/project/farm/issues/3196423
Hierarchy
- class \Drupal\farm_entity\Routing\DefaultHtmlRouteProvider extends \Drupal\entity\Routing\DefaultHtmlRouteProvider
Expanded class hierarchy of DefaultHtmlRouteProvider
1 file declares its use of DefaultHtmlRouteProvider
- farm_entity.module in modules/
core/ entity/ farm_entity.module - Contains farm_entity.module.
File
- modules/
core/ entity/ src/ Routing/ DefaultHtmlRouteProvider.php, line 15
Namespace
Drupal\farm_entity\RoutingView source
class DefaultHtmlRouteProvider extends EntityDefaultHtmlRouteProvider {
/**
* {@inheritdoc}
*/
protected function getAddFormRoute(EntityTypeInterface $entity_type) {
$route = parent::getAddFormRoute($entity_type);
if (!empty($route)) {
$route
->setRequirement('_access', 'FALSE');
}
return $route;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DefaultHtmlRouteProvider:: |
protected | function |