public function CertificateTestEntity::getEntityKey in Certificate 4.x
Gets the value of the given entity key, if defined.
Parameters
string $key: Name of the entity key, for example id, revision or bundle.
Return value
mixed The value of the entity key, NULL if not defined.
Overrides ContentEntityBase::getEntityKey
File
- modules/
certificate_test/ src/ Entity/ CertificateTestEntity.php, line 158
Class
- CertificateTestEntity
- Defines the test entity class.
Namespace
Drupal\certificate_test\EntityCode
public function getEntityKey($key) {
// Typically this protected method is used internally by entity classes and
// exposed publicly through more specific getter methods. So that test cases
// are able to set and access entity keys dynamically, update the visibility
// of this method to public.
return parent::getEntityKey($key);
}