Skip to content
Snippets Groups Projects
Unverified Commit 0f77c769 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3033900 by pcambra: Fix documentation on field_ui.api.php

(cherry picked from commit de09969b)
parent e48108ec
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* The instantiated field formatter plugin. * The instantiated field formatter plugin.
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition. * The field definition.
* @param $view_mode * @param string $view_mode
* The entity view mode. * The entity view mode.
* @param array $form * @param array $form
* The (entire) configuration form array. * The (entire) configuration form array.
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
* @return array * @return array
* Returns the form array to be built. * 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 = []; $element = [];
// Add a 'my_setting' checkbox to the settings form for 'foo_formatter' field // Add a 'my_setting' checkbox to the settings form for 'foo_formatter' field
// formatters. // formatters.
...@@ -50,7 +50,7 @@ function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\Forma ...@@ -50,7 +50,7 @@ function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\Forma
* The instantiated field widget plugin. * The instantiated field widget plugin.
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition. * The field definition.
* @param $form_mode * @param string $form_mode
* The entity form mode. * The entity form mode.
* @param array $form * @param array $form
* The (entire) configuration form array. * The (entire) configuration form array.
...@@ -60,9 +60,9 @@ function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\Forma ...@@ -60,9 +60,9 @@ function hook_field_formatter_third_party_settings_form(\Drupal\Core\Field\Forma
* @return array * @return array
* Returns the form array to be built. * 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 = []; $element = [];
// Add a 'my_setting' checkbox to the settings form for 'foo_widget' field // Add a 'my_setting' checkbox to the settings form for 'foo_widget' field
// widgets. // widgets.
...@@ -81,15 +81,15 @@ function hook_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetIn ...@@ -81,15 +81,15 @@ function hook_field_widget_third_party_settings_form(\Drupal\Core\Field\WidgetIn
* *
* @param array $summary * @param array $summary
* An array of summary messages. * An array of summary messages.
* @param $context * @param array $context
* An associative array with the following elements: * An associative array with the following elements:
* - formatter: The formatter object. * - formatter: The formatter plugin.
* - field_definition: The field definition. * - field_definition: The field definition.
* - view_mode: The view mode being configured. * - 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 // Append a message to the summary when an instance of foo_formatter has
// mysetting set to TRUE for the current view mode. // mysetting set to TRUE for the current view mode.
if ($context['formatter']->getPluginId() == 'foo_formatter') { if ($context['formatter']->getPluginId() == 'foo_formatter') {
...@@ -110,9 +110,9 @@ function hook_field_formatter_settings_summary_alter(&$summary, $context) { ...@@ -110,9 +110,9 @@ function hook_field_formatter_settings_summary_alter(&$summary, $context) {
* - field_definition: The field definition. * - field_definition: The field definition.
* - form_mode: The form mode being configured. * - 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 // Append a message to the summary when an instance of foo_widget has
// mysetting set to TRUE for the current view mode. // mysetting set to TRUE for the current view mode.
if ($context['widget']->getPluginId() == 'foo_widget') { if ($context['widget']->getPluginId() == 'foo_widget') {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment