public function ConditionalFieldController::formTitle in Conditional Fields 8
Same name and namespace in other branches
- 4.x src/Controller/ConditionalFieldController.php \Drupal\conditional_fields\Controller\ConditionalFieldController::formTitle()
Title for fields form.
Parameters
string $entity_type: Entity type.
string $bundle: Entity bundle.
Return value
string Page title.
File
- src/
Controller/ ConditionalFieldController.php, line 96
Class
- ConditionalFieldController
- Returns responses for conditional_fields module routes.
Namespace
Drupal\conditional_fields\ControllerCode
public function formTitle($entity_type, $bundle) {
$bundles = $this->entityTypeBundleInfo
->getBundleInfo($entity_type);
if (!isset($bundles[$bundle]['label'])) {
return '';
}
return $bundles[$bundle]['label'];
}