You are here

public function EntityLegalDocumentAcceptance::label in Entity Legal 3.0.x

Same name and namespace in other branches
  1. 8.2 src/Entity/EntityLegalDocumentAcceptance.php \Drupal\entity_legal\Entity\EntityLegalDocumentAcceptance::label()
  2. 4.0.x src/Entity/EntityLegalDocumentAcceptance.php \Drupal\entity_legal\Entity\EntityLegalDocumentAcceptance::label()

Gets the label of the entity.

Return value

string|null The label of the entity, or NULL if there is no label defined.

Overrides ContentEntityBase::label

File

src/Entity/EntityLegalDocumentAcceptance.php, line 96

Class

EntityLegalDocumentAcceptance
Defines the entity legal document acceptance entity.

Namespace

Drupal\entity_legal\Entity

Code

public function label() {
  return t('Accepted on @date', [
    '@date' => \Drupal::service('date.formatter')
      ->format($this
      ->get('acceptance_date')->value),
  ]);
}