Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fieldblock
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
fieldblock
Commits
0396fa2c
"...git@git.drupal.org:issue/automatic_updates-3406010.git" did not exist on "491930a1f5d626d50c0b48ce1e646cb3a0b7d3c7"
Commit
0396fa2c
authored
10 years ago
by
Marc van Gend
Browse files
Options
Downloads
Patches
Plain Diff
read default value from thirdpartysettings
parent
435cc0df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fieldblock.module
+3
-4
3 additions, 4 deletions
fieldblock.module
with
3 additions
and
4 deletions
fieldblock.module
+
3
−
4
View file @
0396fa2c
...
...
@@ -20,9 +20,8 @@ function fieldblock_form_field_ui_display_overview_form_alter(&$form, &$form_sta
$bundle
=
$form
[
'#bundle'
];
$mode
=
$form
[
'#mode'
];
$config_name
=
'fieldblock.'
.
$entity_type
.
'.'
.
$bundle
;
$config
=
\Drupal
::
config
(
$config_name
);
$settings
=
$config
->
get
(
$mode
);
/** @var \Drupal\Core\Entity\EntityDisplayModeInterface $view_mode_config */
$view_mode_config
=
EntityViewDisplay
::
load
(
$entity_type
.
'.'
.
$bundle
.
'.'
.
$mode
);
// Add a column header.
$form
[
'fields'
][
'#header'
][]
=
t
(
'Display as block'
);
...
...
@@ -32,7 +31,7 @@ function fieldblock_form_field_ui_display_overview_form_alter(&$form, &$form_sta
foreach
(
$field_names
as
$field_name
)
{
$form
[
'fields'
][
$field_name
][
'fieldblock'
]
=
array
(
'#type'
=>
'checkbox'
,
'#default_value'
=>
isset
(
$settings
[
$field_name
]
)
?
true
:
false
,
'#default_value'
=>
$view_mode_config
->
getThirdPartySetting
(
'fieldblock'
,
$field_name
)
?
true
:
false
,
'#title'
=>
''
,
);
}
...
...
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