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
de09969b
Unverified
Commit
de09969b
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
parent
3f9f063d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
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 @
de09969b
...
...
@@ -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\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
=
[];
// 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\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
// mysetting set to TRUE for the current view mode.
if
(
$context
[
'widget'
]
->
getPluginId
()
==
'foo_widget'
)
{
...
...
This diff is collapsed.
Click to expand it.
Alex Pott
@alexpott
mentioned in commit
0f77c769
·
5 years ago
mentioned in commit
0f77c769
mentioned in commit 0f77c7696570c4deeffaf57e8fcbde5870fa3f3f
Toggle commit list
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