protected function EntityFormDisplayEditForm::buildFieldRow in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/field_ui/src/Form/EntityFormDisplayEditForm.php \Drupal\field_ui\Form\EntityFormDisplayEditForm::buildFieldRow()
Builds the table row structure for a single field.
Parameters
\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The field definition.
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Return value
array A table row array.
Overrides EntityDisplayFormBase::buildFieldRow
File
- core/
modules/ field_ui/ src/ Form/ EntityFormDisplayEditForm.php, line 40 - Contains \Drupal\field_ui\Form\EntityFormDisplayEditForm.
Class
- EntityFormDisplayEditForm
- Edit form for the EntityFormDisplay entity type.
Namespace
Drupal\field_ui\FormCode
protected function buildFieldRow(FieldDefinitionInterface $field_definition, array $form, FormStateInterface $form_state) {
$field_row = parent::buildFieldRow($field_definition, $form, $form_state);
$field_name = $field_definition
->getName();
// Update the (invisible) title of the 'plugin' column.
$field_row['plugin']['#title'] = $this
->t('Formatter for @title', array(
'@title' => $field_definition
->getLabel(),
));
if (!empty($field_row['plugin']['settings_edit_form']) && ($plugin = $this->entity
->getRenderer($field_name))) {
$plugin_type_info = $plugin
->getPluginDefinition();
$field_row['plugin']['settings_edit_form']['label']['#markup'] = $this
->t('Widget settings:') . ' <span class="plugin-name">' . $plugin_type_info['label'] . '</span>';
}
return $field_row;
}