getDeleteFormRoute example

$collection->add("entity.{$entity_type_id}.add_form", $add_form_route);
    }

    if ($canonical_route = $this->getCanonicalRoute($entity_type)) {
      $collection->add("entity.{$entity_type_id}.canonical", $canonical_route);
    }

    if ($edit_route = $this->getEditFormRoute($entity_type)) {
      $collection->add("entity.{$entity_type_id}.edit_form", $edit_route);
    }

    if ($delete_route = $this->getDeleteFormRoute($entity_type)) {
      $collection->add("entity.{$entity_type_id}.delete_form", $delete_route);
    }

    if ($collection_route = $this->getCollectionRoute($entity_type)) {
      $collection->add("entity.{$entity_type_id}.collection", $collection_route);
    }

    if ($delete_multiple_route = $this->getDeleteMultipleFormRoute($entity_type)) {
      $collection->add('entity.' . $entity_type->id() . '.delete_multiple_form', $delete_multiple_route);
    }

    
protected function getEditFormRoute(EntityTypeInterface $entity_type) {
    if ($route = parent::getEditFormRoute($entity_type)) {
      $route->setOption('_admin_route', TRUE);
      return $route;
    }
  }

  /** * {@inheritdoc} */
  protected function getDeleteFormRoute(EntityTypeInterface $entity_type) {
    if ($route = parent::getDeleteFormRoute($entity_type)) {
      $route->setOption('_admin_route', TRUE);
      return $route;
    }
  }

  /** * {@inheritdoc} */
  protected function getDeleteMultipleFormRoute(EntityTypeInterface $entity_type) {
    if ($route = parent::getDeleteMultipleFormRoute($entity_type)) {
      $route->setOption('_admin_route', TRUE);
      
Home | Imprint | This part of the site doesn't use cookies.