You are here

ConfigEntityDescriptionTrait.php in Lightning Core 8.3

File

src/ConfigEntityDescriptionTrait.php
View source
<?php

namespace Drupal\lightning_core;


/**
 * Provides a third-party settings implementation of EntityDescriptionInterface.
 */
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);
  }

}

Traits

Namesort descending Description
ConfigEntityDescriptionTrait Provides a third-party settings implementation of EntityDescriptionInterface.