public function ContactController::getTitle in Email Contact 8
1 string reference to 'ContactController::getTitle'
File
- src/
Controller/ ContactController.php, line 18
Class
- ContactController
- Class ContactController.
Namespace
Drupal\email_contact\ControllerCode
public function getTitle($entity_type = NULL, $entity_id = NULL, $field_name = NULL, $view_mode = 'full') {
if ($entity_id == NULL) {
return '';
}
$entity = \Drupal::entityTypeManager()
->getStorage($entity_type)
->load($entity_id);
$title = method_exists($entity, 'getTitle') ? $entity
->getTitle() . ' - Email Contact' : 'Email Contact';
return $title;
}