Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_ct_service
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_ct_service
Commits
9eec5a35
Commit
9eec5a35
authored
3 years ago
by
wodby
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-5127: updating services search
parent
fb1d6f1c
No related branches found
No related tags found
3 merge requests
!60
ISTWCMS-6095 Update maxlength settings for title, text fields and link fields...
,
!25
ISTWCMS-5779 Click update button under...
,
!8
Feature/istwcms 5127 ebremner services blocks gui
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Form/ServiceSearchForm.php
+7
-5
7 additions, 5 deletions
src/Form/ServiceSearchForm.php
with
7 additions
and
5 deletions
src/Form/ServiceSearchForm.php
+
7
−
5
View file @
9eec5a35
...
...
@@ -34,26 +34,28 @@ class ServiceSearchForm extends FormBase {
* An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
* @param
string|null $description
*
The description for the input element
.
* @param
bool $use_placeholder
*
Flag to user placeholder
.
* @param string|null $placeholder
* The placeholder string.
* @param string|null $description
* The description for the input element.
*
* @return array
* The form structure.
*/
public
function
buildForm
(
array
$form
,
FormStateInterface
$form_state
,
string
$description
=
NULL
,
string
$
placeholder
=
NULL
):
array
{
public
function
buildForm
(
array
$form
,
FormStateInterface
$form_state
,
bool
$use_placeholder
=
TRUE
,
string
$placeholder
=
NULL
,
string
$
description
=
NULL
):
array
{
// If there is no placeholder sent, then set it to
// search all services.
if
(
!
$placeholder
)
{
if
(
$use_placeholder
&&
$placeholder
==
NULL
)
{
$placeholder
=
'Search within all services'
;
}
// The search input.
$form
[
'search_input'
]
=
[
'#type'
=>
'textfield'
,
'#placeholder'
=>
$placeholder
,
'#placeholder'
=>
$
use_
placeholder
?
$placeholder
:
NULL
,
'#description'
=>
$description
??
NULL
,
'#required'
=>
TRUE
,
];
...
...
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