public function UserConsent::label in Data Policy 8
Override of the default label() function to return a human-friendly name.
Return value
\Drupal\Component\Render\MarkupInterface|mixed|string|null
Overrides ContentEntityBase::label
File
- src/
Entity/ UserConsent.php, line 196
Class
- UserConsent
- Defines the User consent entity.
Namespace
Drupal\data_policy\EntityCode
public function label() {
$user = $this
->getOwner();
if ($user && $user
->getDisplayName()) {
return $user
->getDisplayName();
}
return '';
}