DefaultHtmlRouteProvider.php in farmOS 2.x
File
modules/core/entity/src/Routing/DefaultHtmlRouteProvider.php
View source
<?php
namespace Drupal\farm_entity\Routing;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\entity\Routing\DefaultHtmlRouteProvider as EntityDefaultHtmlRouteProvider;
class DefaultHtmlRouteProvider extends EntityDefaultHtmlRouteProvider {
protected function getAddFormRoute(EntityTypeInterface $entity_type) {
$route = parent::getAddFormRoute($entity_type);
if (!empty($route)) {
$route
->setRequirement('_access', 'FALSE');
}
return $route;
}
}