function EntityTypeInterface::setUriCallback

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/Entity/EntityTypeInterface.php \Drupal\Core\Entity\EntityTypeInterface::setUriCallback()
  2. 9 core/lib/Drupal/Core/Entity/EntityTypeInterface.php \Drupal\Core\Entity\EntityTypeInterface::setUriCallback()
  3. 8.9.x core/lib/Drupal/Core/Entity/EntityTypeInterface.php \Drupal\Core\Entity\EntityTypeInterface::setUriCallback()
  4. main core/lib/Drupal/Core/Entity/EntityTypeInterface.php \Drupal\Core\Entity\EntityTypeInterface::setUriCallback()

Sets a callable to use to provide the entity URI.

Parameters

callable $callback: A callback to use to provide a URI for the entity.

Return value

$this

Deprecated

in drupal:11.4.0 and is removed from drupal:13.0.0. Use link templates or a route provider to specify entity URIs.

See also

https://www.drupal.org/node/3575062

1 method overrides EntityTypeInterface::setUriCallback()
EntityType::setUriCallback in core/lib/Drupal/Core/Entity/EntityType.php
Sets a callable to use to provide the entity URI.

File

core/lib/Drupal/Core/Entity/EntityTypeInterface.php, line 706

Class

EntityTypeInterface
Provides an interface for an entity type and its metadata.

Namespace

Drupal\Core\Entity

Code

public function setUriCallback($callback);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.