public function ConditionalFieldController::editFormTitle in Conditional Fields 4.x
Same name and namespace in other branches
- 8 src/Controller/ConditionalFieldController.php \Drupal\conditional_fields\Controller\ConditionalFieldController::editFormTitle()
Title for field settings form.
Parameters
string $entity_type: Entity type.
string $bundle: Entity bundle.
string $field_name: Field name.
Return value
string Page title.
File
- src/
Controller/ ConditionalFieldController.php, line 120
Class
- ConditionalFieldController
- Returns responses for conditional_fields module routes.
Namespace
Drupal\conditional_fields\ControllerCode
public function editFormTitle($entity_type, $bundle, $field_name) {
$instances = $this->entityFieldManager
->getFieldDefinitions($entity_type, $bundle);
if (!isset($instances[$field_name])) {
return '';
}
$field_instance = $instances[$field_name];
return $field_instance
->getLabel();
}