You are here

trait ConfigEntityDescriptionTrait in Lightning Core 8

Same name and namespace in other branches
  1. 8.5 src/ConfigEntityDescriptionTrait.php \Drupal\lightning_core\ConfigEntityDescriptionTrait
  2. 8.2 src/ConfigEntityDescriptionTrait.php \Drupal\lightning_core\ConfigEntityDescriptionTrait
  3. 8.3 src/ConfigEntityDescriptionTrait.php \Drupal\lightning_core\ConfigEntityDescriptionTrait
  4. 8.4 src/ConfigEntityDescriptionTrait.php \Drupal\lightning_core\ConfigEntityDescriptionTrait

Provides a third-party settings implementation of EntityDescriptionInterface.

Hierarchy

3 files declare their use of ConfigEntityDescriptionTrait
EntityFormMode.php in src/Entity/EntityFormMode.php
EntityViewMode.php in src/Entity/EntityViewMode.php
Role.php in src/Entity/Role.php

File

src/ConfigEntityDescriptionTrait.php, line 8

Namespace

Drupal\lightning_core
View source
trait ConfigEntityDescriptionTrait {

  /**
   * Implements EntityDescriptionInterface::getDescription().
   */
  public function getDescription() {
    return $this
      ->getThirdPartySetting('lightning_core', 'description');
  }

  /**
   * Implements EntityDescriptionInterface::getDescription().
   */
  public function setDescription($description) {
    return $this
      ->setThirdPartySetting('lightning_core', 'description', (string) $description);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigEntityDescriptionTrait::getDescription public function Implements EntityDescriptionInterface::getDescription().
ConfigEntityDescriptionTrait::setDescription public function Implements EntityDescriptionInterface::getDescription().