Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rest_views
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
rest_views
Merge requests
!23
Add image title field export, remove image loading setting
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Add image title field export, remove image loading setting
issue/rest_views-3473318:3.0.x
into
3.0.x
Overview
0
Commits
1
Pipelines
1
Changes
1
Open
Reinhard Hutter
requested to merge
issue/rest_views-3473318:3.0.x
into
3.0.x
8 months ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Expand
Fixes
#3473318
:
Allow image title field export in views plugin
Remove "image loading" setting from views plugin
0
0
Merge request reports
Compare
3.0.x
3.0.x (HEAD)
and
latest version
latest version
fd87b32c
1 commit,
8 months ago
1 file
+
14
−
26
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
src/Plugin/Field/FieldFormatter/ImageExportFormatter.php
+
14
−
26
Options
@@ -39,32 +39,20 @@ class ImageExportFormatter extends ImageFormatter {
public
function
settingsForm
(
array
$form
,
FormStateInterface
$formState
):
array
{
$form
=
parent
::
settingsForm
(
$form
,
$formState
);
unset
(
$form
[
'image_link'
]);
$alt
=
$this
->
getFieldSetting
(
'alt_field'
);
$title
=
$this
->
getFieldSetting
(
'title_field'
);
if
(
$alt
)
{
$form
[
'export_alt'
]
=
[
'#type'
=>
'checkbox'
,
'#title'
=>
$this
->
t
(
'Export <em>Alt</em> field'
),
'#description'
=>
$this
->
t
(
'Enabling this will export an object instead of a string.'
),
'#default_value'
=>
$this
->
getSetting
(
'export_alt'
),
];
}
else
{
$form
[
'export_alt'
]
=
[
'#type'
=>
'value'
,
'#value'
=>
FALSE
];
}
if
(
$title
)
{
$form
[
'export_title'
]
=
[
'#type'
=>
'checkbox'
,
'#title'
=>
$this
->
t
(
'Export <em>Title</em> field'
),
'#description'
=>
$this
->
t
(
'Enabling this will export an object instead of a string.'
),
'#default_value'
=>
$this
->
getSetting
(
'export_title'
),
];
}
else
{
$form
[
'export_title'
]
=
[
'#type'
=>
'value'
,
'#value'
=>
FALSE
];
}
unset
(
$form
[
'image_loading'
]);
$form
[
'export_alt'
]
=
[
'#type'
=>
'checkbox'
,
'#title'
=>
$this
->
t
(
'Export <em>Alt</em> field'
),
'#description'
=>
$this
->
t
(
'Enabling this will export an object instead of a string.'
),
'#default_value'
=>
$this
->
getSetting
(
'export_alt'
),
];
$form
[
'export_title'
]
=
[
'#type'
=>
'checkbox'
,
'#title'
=>
$this
->
t
(
'Export <em>Title</em> field'
),
'#description'
=>
$this
->
t
(
'Enabling this will export an object instead of a string.'
),
'#default_value'
=>
$this
->
getSetting
(
'export_title'
),
];
return
$form
;
}
Loading