entity_generic-8.x-3.x-dev/src/Generic/EntityLabelTrait.php
src/Generic/EntityLabelTrait.php
<?php
namespace Drupal\entity_generic\Generic;
/**
* Implements label functionality.
*/
trait EntityLabelTrait {
/**
* The human-readable name of the space.
*
* @var string
*/
protected $label;
/**
* {@inheritdoc}
*/
public function getLabel() {
return $this->label();
}
/**
* {@inheritdoc}
*/
public function setLabel($label) {
return $this->set($this->getEntityType()->getKey('label'), $label);
}
}
