public function Mapping::getFormattedContentType in GatherContent 8.5
Same name and namespace in other branches
- 8.3 src/Entity/Mapping.php \Drupal\gathercontent\Entity\Mapping::getFormattedContentType()
- 8.4 src/Entity/Mapping.php \Drupal\gathercontent\Entity\Mapping::getFormattedContentType()
Formatter for content type property.
Return value
string If not empty return human name for content type, else return None string.
Overrides MappingInterface::getFormattedContentType
File
- src/
Entity/ Mapping.php, line 250
Class
- Mapping
- Defines the GatherContent Mapping entity.
Namespace
Drupal\gathercontent\EntityCode
public function getFormattedContentType() {
$content_type = $this
->get('content_type_name');
if (!empty($content_type)) {
return $content_type;
}
else {
return $this
->t('None');
}
}