Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
superfish
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
superfish
Commits
df89bfef
Commit
df89bfef
authored
1 year ago
by
Nikolay Lobachev
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#2851702
: Missing schema.xml
parent
34a6e7da
No related branches found
No related tags found
1 merge request
!6
Issue #2851702: Missing schema.xml
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/schema/superfish.schema.yml
+152
-0
152 additions, 0 deletions
config/schema/superfish.schema.yml
src/Plugin/Block/SuperfishBlock.php
+36
-36
36 additions, 36 deletions
src/Plugin/Block/SuperfishBlock.php
with
188 additions
and
36 deletions
config/schema/superfish.schema.yml
0 → 100644
+
152
−
0
View file @
df89bfef
# Schema for the configuration files of the superfish module.
block.settings.superfish:*
:
type
:
block_settings
label
:
'
Superfish
menu'
mapping
:
level
:
type
:
integer
label
:
'
Starting
level'
depth
:
type
:
integer
label
:
'
Maximum
number
of
levels'
expand_all_items
:
type
:
boolean
label
:
'
Expand
all
items'
menu_type
:
type
:
string
label
:
'
Menu
type'
style
:
type
:
string
label
:
'
Style'
arrow
:
type
:
integer
label
:
'
Add
arrows
to
parent
menus'
shadow
:
type
:
integer
label
:
'
Drop
shadows'
speed
:
type
:
string
label
:
'
Animation
speed'
delay
:
type
:
integer
label
:
'
Mouse
delay'
slide
:
type
:
string
label
:
'
Slide-in
effect'
supposition
:
type
:
integer
label
:
'
jQuery
Supposition'
hoverintent
:
type
:
integer
label
:
'
jQuery
hoverIntent'
touch
:
type
:
integer
label
:
'
sf-Touchscreen'
touchbh
:
type
:
integer
label
:
'
sf-Touchscreen
behaviour'
touchbp
:
type
:
integer
label
:
'
sf-Touchscreen
Breakpoint'
touchua
:
type
:
integer
label
:
'
sf-Touchscreen
User
agent
settings'
touchual
:
type
:
string
label
:
'
sf-Touchscreen
Custom
list
of
the
user
agents'
touchuam
:
type
:
integer
label
:
'
sf-Touchscreen
User
agent
detection
method'
small
:
type
:
integer
label
:
'
sf-Smallscreen'
smallbp
:
type
:
integer
label
:
'
sf-Smallscreen
Breakpoint'
smallua
:
type
:
integer
label
:
'
sf-Smallscreen
User
agent
settings'
smallual
:
type
:
string
label
:
'
sf-Smallscreen
Custom
list
of
the
user
agents'
smalluam
:
type
:
integer
label
:
'
sf-Smallscreen
User
agent
detection
method'
smallact
:
type
:
integer
label
:
'
sf-Smallscreen
type'
smallset
:
type
:
integer
label
:
'
sf-Smallscreen
select
title'
smallasa
:
type
:
integer
label
:
'
sf-Smallscreen
select
option
attributes'
smallcmc
:
type
:
integer
label
:
'
sf-Smallscreen
select
copy
classes'
smallecm
:
type
:
string
label
:
'
sf-Smallscreen
select
exclude
classes'
smallchc
:
type
:
integer
label
:
'
sf-Smallscreen
select
copy
link
classes'
smallech
:
type
:
integer
label
:
'
sf-Smallscreen
select
exclude
link
classes'
smallicm
:
type
:
string
label
:
'
sf-Smallscreen
select
include
these
classes
in
select'
smallich
:
type
:
string
label
:
'
sf-Smallscreen
select
include
these
classes
in
option'
smallamt
:
type
:
string
label
:
'
sf-Smallscreen
Accordion
menu
title'
smallabt
:
type
:
integer
label
:
'
sf-Smallscreen
Accordion
button
type'
supersubs
:
type
:
integer
label
:
'
Supersubs'
minwidth
:
type
:
integer
label
:
'
Minimum
width'
maxwidth
:
type
:
integer
label
:
'
Max
width'
multicolumn
:
type
:
integer
label
:
'
Enable
multi-column
sub-menus'
multicolumn_depth
:
type
:
integer
label
:
'
Start
from
depth'
multicolumn_levels
:
type
:
integer
label
:
'
Levels'
pathlevels
:
type
:
integer
label
:
'
Path
levels'
expanded
:
type
:
integer
label
:
'
Take
"Expanded"
option
into
effect'
clone_parent
:
type
:
integer
label
:
'
Add
cloned
parent
links
to
the
top
of
sub-menus'
hide_linkdescription
:
type
:
integer
label
:
'
Disable
hyperlink
descriptions
("title"
attribute)'
add_linkdescription
:
type
:
integer
label
:
'
Insert
hyperlink
descriptions
("title"
attribute)
into
hyperlink
texts'
link_depth_class
:
type
:
integer
label
:
'
Add
item
depth
classes
to
menu
items
and
their
hyperlinks'
custom_list_class
:
type
:
string
label
:
'
Class
for
the
main
UL'
custom_item_class
:
type
:
string
label
:
'
For
the
list
items'
custom_link_class
:
type
:
string
label
:
'
For
the
hyperlinks'
This diff is collapsed.
Click to expand it.
src/Plugin/Block/SuperfishBlock.php
+
36
−
36
View file @
df89bfef
...
...
@@ -37,7 +37,7 @@ class SuperfishBlock extends SystemMenuBlock {
* @var \Drupal\Core\Extension\ModuleHandler
*/
protected
$moduleHandler
;
/**
* Constructs a new SuperfishBlock.
*
...
...
@@ -885,8 +885,8 @@ class SuperfishBlock extends SystemMenuBlock {
*/
public
function
blockSubmit
(
$form
,
FormStateInterface
$form_state
)
{
$this
->
configuration
[
'level'
]
=
$form_state
->
getValue
(
'level'
);
$this
->
configuration
[
'depth'
]
=
$form_state
->
getValue
(
'depth'
);
$this
->
configuration
[
'level'
]
=
(
int
)
$form_state
->
getValue
(
'level'
);
$this
->
configuration
[
'depth'
]
=
(
int
)
$form_state
->
getValue
(
'depth'
);
$this
->
configuration
[
'menu_type'
]
=
$form_state
->
getValue
([
'sf'
,
'superfish_type'
,
...
...
@@ -895,11 +895,11 @@ class SuperfishBlock extends SystemMenuBlock {
'sf'
,
'superfish_style'
,
]);
$this
->
configuration
[
'arrow'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'arrow'
]
=
(
int
)
$form_state
->
getValue
([
'sf'
,
'superfish_arrow'
,
]);
$this
->
configuration
[
'shadow'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'shadow'
]
=
(
int
)
$form_state
->
getValue
([
'sf'
,
'superfish_shadow'
,
]);
...
...
@@ -908,32 +908,32 @@ class SuperfishBlock extends SystemMenuBlock {
'superfish_slide'
,
]);
$this
->
configuration
[
'supposition'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'supposition'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'superfish_supposition'
,
]);
$this
->
configuration
[
'hoverintent'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'hoverintent'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'superfish_hoverintent'
,
]);
$this
->
configuration
[
'touch'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'touch'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-touchscreen'
,
'superfish_touch'
,
]);
$this
->
configuration
[
'touchbh'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'touchbh'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-touchscreen'
,
'superfish_touchbh'
,
]);
$this
->
configuration
[
'touchbp'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'touchbp'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-touchscreen'
,
'sf-touchscreen-windowwidth'
,
'superfish_touchbp'
,
]);
$this
->
configuration
[
'touchua'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'touchua'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-touchscreen'
,
'sf-touchscreen-useragent'
,
...
...
@@ -945,30 +945,30 @@ class SuperfishBlock extends SystemMenuBlock {
'sf-touchscreen-useragent'
,
'superfish_touchual'
,
]);
$this
->
configuration
[
'touchuam'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'touchuam'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-touchscreen'
,
'sf-touchscreen-useragent'
,
'superfish_touchuam'
,
]);
$this
->
configuration
[
'small'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'small'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-smallscreen'
,
'superfish_small'
,
]);
$this
->
configuration
[
'smallact'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'smallact'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-smallscreen'
,
'superfish_smallact'
,
]);
$this
->
configuration
[
'smallbp'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'smallbp'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-smallscreen'
,
'sf-smallscreen-windowwidth'
,
'superfish_smallbp'
,
]);
$this
->
configuration
[
'smallua'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'smallua'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-smallscreen'
,
'sf-smallscreen-useragent'
,
...
...
@@ -980,7 +980,7 @@ class SuperfishBlock extends SystemMenuBlock {
'sf-smallscreen-useragent'
,
'superfish_smallual'
,
]);
$this
->
configuration
[
'smalluam'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'smalluam'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-smallscreen'
,
'sf-smallscreen-useragent'
,
...
...
@@ -992,13 +992,13 @@ class SuperfishBlock extends SystemMenuBlock {
'sf-smallscreen-select'
,
'superfish_smallset'
,
]);
$this
->
configuration
[
'smallasa'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'smallasa'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-smallscreen'
,
'sf-smallscreen-select'
,
'superfish_smallasa'
,
]);
$this
->
configuration
[
'smallcmc'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'smallcmc'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-smallscreen'
,
'sf-smallscreen-select'
,
...
...
@@ -1012,7 +1012,7 @@ class SuperfishBlock extends SystemMenuBlock {
'sf-smallscreen-select-more'
,
'superfish_smallecm'
,
]);
$this
->
configuration
[
'smallchc'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'smallchc'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-smallscreen'
,
'sf-smallscreen-select'
,
...
...
@@ -1046,37 +1046,37 @@ class SuperfishBlock extends SystemMenuBlock {
'sf-smallscreen-accordion'
,
'superfish_smallamt'
,
]);
$this
->
configuration
[
'smallabt'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'smallabt'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-smallscreen'
,
'sf-smallscreen-accordion'
,
'superfish_smallabt'
,
]);
$this
->
configuration
[
'supersubs'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'supersubs'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-supersubs'
,
'superfish_supersubs'
,
]);
$this
->
configuration
[
'minwidth'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'minwidth'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-supersubs'
,
'superfish_minwidth'
,
]);
$this
->
configuration
[
'maxwidth'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'maxwidth'
]
=
(
int
)
$form_state
->
getValue
([
'sf-plugins'
,
'sf-supersubs'
,
'superfish_maxwidth'
,
]);
$this
->
configuration
[
'multicolumn'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'multicolumn'
]
=
(
int
)
$form_state
->
getValue
([
'sf-multicolumn'
,
'superfish_multicolumn'
,
]);
$this
->
configuration
[
'multicolumn_depth'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'multicolumn_depth'
]
=
(
int
)
$form_state
->
getValue
([
'sf-multicolumn'
,
'superfish_multicolumn_depth'
,
]);
$this
->
configuration
[
'multicolumn_levels'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'multicolumn_levels'
]
=
(
int
)
$form_state
->
getValue
([
'sf-multicolumn'
,
'superfish_multicolumn_levels'
,
]);
...
...
@@ -1086,37 +1086,37 @@ class SuperfishBlock extends SystemMenuBlock {
'sf-settings'
,
'superfish_speed'
,
]);
$this
->
configuration
[
'delay'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'delay'
]
=
(
int
)
$form_state
->
getValue
([
'sf-advanced'
,
'sf-settings'
,
'superfish_delay'
,
]);
$this
->
configuration
[
'pathlevels'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'pathlevels'
]
=
(
int
)
$form_state
->
getValue
([
'sf-advanced'
,
'sf-settings'
,
'superfish_pathlevels'
,
]);
$this
->
configuration
[
'expanded'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'expanded'
]
=
(
int
)
$form_state
->
getValue
([
'sf-advanced'
,
'sf-hyperlinks'
,
'superfish_expanded'
,
]);
$this
->
configuration
[
'clone_parent'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'clone_parent'
]
=
(
int
)
$form_state
->
getValue
([
'sf-advanced'
,
'sf-hyperlinks'
,
'superfish_clone_parent'
,
]);
$this
->
configuration
[
'hide_linkdescription'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'hide_linkdescription'
]
=
(
int
)
$form_state
->
getValue
([
'sf-advanced'
,
'sf-hyperlinks'
,
'superfish_hide_linkdescription'
,
]);
$this
->
configuration
[
'add_linkdescription'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'add_linkdescription'
]
=
(
int
)
$form_state
->
getValue
([
'sf-advanced'
,
'sf-hyperlinks'
,
'superfish_add_linkdescription'
,
]);
$this
->
configuration
[
'link_depth_class'
]
=
$form_state
->
getValue
([
$this
->
configuration
[
'link_depth_class'
]
=
(
int
)
$form_state
->
getValue
([
'sf-advanced'
,
'sf-hyperlinks'
,
'superfish_itemdepth'
,
...
...
@@ -1462,7 +1462,7 @@ class SuperfishBlock extends SystemMenuBlock {
}
}
// Attaching the require
s
JavaScript and CSS files.
// Attaching the require
d
JavaScript and CSS files.
$build
[
'#attached'
][
'library'
][]
=
'superfish/superfish'
;
if
(
$sfsettings
[
'style'
]
!=
'none'
)
{
$style
=
'superfish/superfish_style_'
.
$sfsettings
[
'style'
];
...
...
@@ -1495,7 +1495,7 @@ class SuperfishBlock extends SystemMenuBlock {
$depth
=
$sfsettings
[
'depth'
];
/*
* By not setting
the
any expanded parents we don't limit the loading of the
* By not setting any expanded parents we don't limit the loading of the
* subtrees.
* Calling MenuLinkTreeInterface::getCurrentRouteMenuTreeParameters we
* would be doing so.
...
...
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