You are here

public function Mapping::getFormattedEntityType in GatherContent 8.5

Formatter for entity type property.

Return value

string If not empty return human name for entity type, else return None string.

Overrides MappingInterface::getFormattedEntityType

File

src/Entity/Mapping.php, line 263

Class

Mapping
Defines the GatherContent Mapping entity.

Namespace

Drupal\gathercontent\Entity

Code

public function getFormattedEntityType() {
  $entity_type = $this
    ->get('entity_type');
  if (!empty($entity_type)) {
    return ucfirst($entity_type);
  }
  else {
    return $this
      ->t('None');
  }
}