class LinkManager in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/rest/src/LinkManager/LinkManager.php \Drupal\rest\LinkManager\LinkManager
Hierarchy
- class \Drupal\rest\LinkManager\LinkManager implements LinkManagerInterface
Expanded class hierarchy of LinkManager
2 files declare their use of LinkManager
- FileNormalizeTest.php in core/
modules/ hal/ src/ Tests/ FileNormalizeTest.php - Contains \Drupal\hal\Tests\FileNormalizeTest.
- NormalizerTestBase.php in core/
modules/ hal/ src/ Tests/ NormalizerTestBase.php - Contains \Drupal\hal\Tests\NormalizerTestBase.
1 string reference to 'LinkManager'
- rest.services.yml in core/
modules/ rest/ rest.services.yml - core/modules/rest/rest.services.yml
1 service uses LinkManager
- rest.link_manager in core/
modules/ rest/ rest.services.yml - Drupal\rest\LinkManager\LinkManager
File
- core/
modules/ rest/ src/ LinkManager/ LinkManager.php, line 9 - Contains \Drupal\rest\LinkManager\LinkManager.
Namespace
Drupal\rest\LinkManagerView source
class LinkManager implements LinkManagerInterface {
/**
* The type link manager.
*
* @var \Drupal\rest\LinkManager\TypeLinkManagerInterface
*/
protected $typeLinkManager;
/**
* The relation link manager.
*
* @var \Drupal\rest\LinkManager\RelationLinkManagerInterface
*/
protected $relationLinkManager;
/**
* Constructor.
*
* @param \Drupal\rest\LinkManager\TypeLinkManagerInterface $type_link_manager
* Manager for handling bundle URIs.
* @param \Drupal\rest\LinkManager\RelationLinkManagerInterface $relation_link_manager
* Manager for handling bundle URIs.
*/
public function __construct(TypeLinkManagerInterface $type_link_manager, RelationLinkManagerInterface $relation_link_manager) {
$this->typeLinkManager = $type_link_manager;
$this->relationLinkManager = $relation_link_manager;
}
/**
* {@inheritdoc}
*/
public function getTypeUri($entity_type, $bundle, $context = array()) {
return $this->typeLinkManager
->getTypeUri($entity_type, $bundle, $context);
}
/**
* {@inheritdoc}
*/
public function getTypeInternalIds($type_uri, $context = array()) {
return $this->typeLinkManager
->getTypeInternalIds($type_uri, $context);
}
/**
* {@inheritdoc}
*/
public function getRelationUri($entity_type, $bundle, $field_name, $context = array()) {
return $this->relationLinkManager
->getRelationUri($entity_type, $bundle, $field_name, $context);
}
/**
* {@inheritdoc}
*/
public function getRelationInternalIds($relation_uri) {
return $this->relationLinkManager
->getRelationInternalIds($relation_uri);
}
/**
* {@inheritdoc}
*/
public function setLinkDomain($domain) {
$this->relationLinkManager
->setLinkDomain($domain);
$this->typeLinkManager
->setLinkDomain($domain);
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LinkManager:: |
protected | property | The relation link manager. | |
LinkManager:: |
protected | property | The type link manager. | |
LinkManager:: |
public | function |
Translates a REST URI into internal IDs. Overrides RelationLinkManagerInterface:: |
|
LinkManager:: |
public | function |
Gets the URI that corresponds to a field. Overrides RelationLinkManagerInterface:: |
|
LinkManager:: |
public | function |
Get a bundle's Typed Data IDs based on a URI. Overrides TypeLinkManagerInterface:: |
|
LinkManager:: |
public | function |
Gets the URI that corresponds to a bundle. Overrides TypeLinkManagerInterface:: |
|
LinkManager:: |
public | function |
Sets the link domain used in constructing link URIs. Overrides ConfigurableLinkManagerInterface:: |
|
LinkManager:: |
public | function | Constructor. |