Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
0f77c769
Unverified
Commit
0f77c769
authored
5 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/field_ui/field_ui.api.php
+12
-12
12 additions, 12 deletions
core/modules/field_ui/field_ui.api.php
with
12 additions
and
12 deletions
core/modules/field_ui/field_ui.api.php
+
12
−
12
View file @
0f77c769
...
@@ -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\Form
DisplayOverView
* @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\Form
DisplayOverView
* @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'
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment