public function EntityType::getKey in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityType.php \Drupal\Core\Entity\EntityType::getKey()
Gets a specific entity key.
Parameters
string $key: The name of the entity key to return.
Return value
string|bool The entity key, or FALSE if it does not exist.
Overrides EntityTypeInterface::getKey
See also
File
- core/
lib/ Drupal/ Core/ Entity/ EntityType.php, line 353 - Contains \Drupal\Core\Entity\EntityType.
Class
- EntityType
- Provides an implementation of an entity type and its metadata.
Namespace
Drupal\Core\EntityCode
public function getKey($key) {
$keys = $this
->getKeys();
return isset($keys[$key]) ? $keys[$key] : FALSE;
}