From de09969baff986c2310115acdd64dddf995c6ed4 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Tue, 2 Apr 2019 17:08:27 +0100 Subject: [PATCH] Issue #3033900 by pcambra: Fix documentation on field_ui.api.php --- core/modules/field_ui/field_ui.api.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/core/modules/field_ui/field_ui.api.php b/core/modules/field_ui/field_ui.api.php index 92cbaf2700e..4d764ad8542 100644 --- a/core/modules/field_ui/field_ui.api.php +++ b/core/modules/field_ui/field_ui.api.php @@ -17,7 +17,7 @@ * The instantiated field formatter plugin. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition. - * @param $view_mode + * @param string $view_mode * The entity view mode. * @param array $form * The (entire) configuration form array. @@ -27,9 +27,9 @@ * @return array * Returns the form array to be built. * - * @see \Drupal\field_ui\DisplayOverView + * @see \Drupal\field_ui\Form\EntityViewDisplayEditForm::thirdPartySettingsForm() */ -function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\FormatterInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $view_mode, $form, \Drupal\Core\Form\FormStateInterface $form_state) { +function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\FormatterInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $view_mode, array $form, \Drupal\Core\Form\FormStateInterface $form_state) { $element = []; // Add a 'my_setting' checkbox to the settings form for 'foo_formatter' field // formatters. @@ -50,7 +50,7 @@ function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\Forma * The instantiated field widget plugin. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The field definition. - * @param $form_mode + * @param string $form_mode * The entity form mode. * @param array $form * The (entire) configuration form array. @@ -60,9 +60,9 @@ function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\Forma * @return array * Returns the form array to be built. * - * @see \Drupal\field_ui\FormDisplayOverView + * @see \Drupal\field_ui\Form\EntityFormDisplayEditForm::thirdPartySettingsForm() */ -function hook_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $form_mode, $form, \Drupal\Core\Form\FormStateInterface $form_state) { +function hook_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetInterface $plugin, \Drupal\Core\Field\FieldDefinitionInterface $field_definition, $form_mode, array $form, \Drupal\Core\Form\FormStateInterface $form_state) { $element = []; // Add a 'my_setting' checkbox to the settings form for 'foo_widget' field // widgets. @@ -81,15 +81,15 @@ function hook_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetIn * * @param array $summary * An array of summary messages. - * @param $context + * @param array $context * An associative array with the following elements: - * - formatter: The formatter object. + * - formatter: The formatter plugin. * - field_definition: The field definition. * - view_mode: The view mode being configured. * - * @see \Drupal\field_ui\DisplayOverView + * @see \Drupal\field_ui\Form\EntityViewDisplayEditForm::alterSettingsSummary() */ -function hook_field_formatter_settings_summary_alter(&$summary, $context) { +function hook_field_formatter_settings_summary_alter(array &$summary, array $context) { // Append a message to the summary when an instance of foo_formatter has // mysetting set to TRUE for the current view mode. if ($context['formatter']->getPluginId() == 'foo_formatter') { @@ -110,9 +110,9 @@ function hook_field_formatter_settings_summary_alter(&$summary, $context) { * - field_definition: The field definition. * - form_mode: The form mode being configured. * - * @see \Drupal\field_ui\FormDisplayOverView + * @see \Drupal\field_ui\Form\EntityFormDisplayEditForm::alterSettingsSummary() */ -function hook_field_widget_settings_summary_alter(&$summary, $context) { +function hook_field_widget_settings_summary_alter(array &$summary, array $context) { // Append a message to the summary when an instance of foo_widget has // mysetting set to TRUE for the current view mode. if ($context['widget']->getPluginId() == 'foo_widget') {