public function OgMenuInstance::getFieldTargetTypeLabel in Organic Groups Menu (OG Menu) 8
Returns the label of the target group entity type of the instance.
Return value
string The label of the entity type.
1 call to OgMenuInstance::getFieldTargetTypeLabel()
- OgMenuInstance::label in src/
Entity/ OgMenuInstance.php - Gets the label of the entity.
File
- src/
Entity/ OgMenuInstance.php, line 165 - Contains \Drupal\og_menu\Entity\OgMenuInstance.
Class
- OgMenuInstance
- Defines the OG Menu instance entity.
Namespace
Drupal\og_menu\EntityCode
public function getFieldTargetTypeLabel() {
try {
return $this
->getGroup()
->label();
} catch (\Exception $e) {
\Drupal::logger('og_menu')
->log(RfcLogLevel::WARNING, 'Missing parent group for menu instance @id, check if OG is configured to delete orphans.', [
'@id' => $this
->id(),
]);
return t('- Parent group missing -');
}
}