Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
trigger_api
Commits
7b56f1f9
Commit
7b56f1f9
authored
Oct 08, 2021
by
Thomas SECHER
Browse files
Field data translatable
parent
eeee5653
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Plugin/WebformElement/WebformTriggerApi.php
View file @
7b56f1f9
...
@@ -63,9 +63,9 @@ class WebformTriggerApi extends WebformElementBase {
...
@@ -63,9 +63,9 @@ class WebformTriggerApi extends WebformElementBase {
*/
*/
protected
function
defineDefaultProperties
()
{
protected
function
defineDefaultProperties
()
{
return
[
return
[
'multiple'
=>
FALSE
,
'multiple'
=>
FALSE
,
static
::
FIELD_TYPE
=>
''
,
static
::
FIELD_TYPE
=>
''
,
static
::
FIELD_DATA
=>
''
,
static
::
FIELD_DATA
=>
''
,
static
::
FIELD_EVENT_TYPE
=>
static
::
EVENT_TYPE_NO_ERROR
,
static
::
FIELD_EVENT_TYPE
=>
static
::
EVENT_TYPE_NO_ERROR
,
]
+
parent
::
defineDefaultProperties
();
]
+
parent
::
defineDefaultProperties
();
...
@@ -77,7 +77,7 @@ class WebformTriggerApi extends WebformElementBase {
...
@@ -77,7 +77,7 @@ class WebformTriggerApi extends WebformElementBase {
protected
function
defineTranslatableProperties
()
{
protected
function
defineTranslatableProperties
()
{
return
array_merge
(
return
array_merge
(
parent
::
defineTranslatableProperties
(),
parent
::
defineTranslatableProperties
(),
[
'null_label'
]
[
'null_label'
,
static
::
FIELD_DATA
],
);
);
}
}
...
@@ -114,11 +114,11 @@ class WebformTriggerApi extends WebformElementBase {
...
@@ -114,11 +114,11 @@ class WebformTriggerApi extends WebformElementBase {
'#title'
=>
$this
->
t
(
'Event type'
),
'#title'
=>
$this
->
t
(
'Event type'
),
'#default_value'
=>
''
,
'#default_value'
=>
''
,
'#required'
=>
TRUE
,
'#required'
=>
TRUE
,
'#options'
=>
[
'#options'
=>
[
static
::
EVENT_TYPE_NO_ERROR
=>
$this
->
t
(
'On valid form only.'
),
static
::
EVENT_TYPE_NO_ERROR
=>
$this
->
t
(
'On valid form only.'
),
static
::
EVENT_TYPE_ERROR
=>
$this
->
t
(
'On errors only.'
),
static
::
EVENT_TYPE_ERROR
=>
$this
->
t
(
'On errors only.'
),
],
],
'#description'
=>
$this
->
t
(
'The element must be placed at the end of the form part to be efficient.'
)
'#description'
=>
$this
->
t
(
'The element must be placed at the end of the form part to be efficient.'
)
];
];
return
$form
;
return
$form
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment