Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
bootstrap_layout_builder
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
bootstrap_layout_builder
Commits
32025ad7
There was an error fetching the commit references. Please try again later.
Commit
32025ad7
authored
4 years ago
by
Mahmoud Zayed
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused statements& run code sniffer.
parent
31c4a0de
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Entity/LayoutOption.php
+0
-1
0 additions, 1 deletion
src/Entity/LayoutOption.php
src/Form/LayoutOptionForm.php
+3
-4
3 additions, 4 deletions
src/Form/LayoutOptionForm.php
src/Plugin/Layout/BootstrapLayout.php
+4
-4
4 additions, 4 deletions
src/Plugin/Layout/BootstrapLayout.php
with
7 additions
and
9 deletions
src/Entity/LayoutOption.php
+
0
−
1
View file @
32025ad7
...
...
@@ -4,7 +4,6 @@ namespace Drupal\bootstrap_layout_builder\Entity;
use
Drupal\Core\Config\Entity\ConfigEntityBase
;
use
Drupal\bootstrap_layout_builder
\LayoutOptionInterface
;
use
Drupal\Core\Entity\Annotation\ConfigEntityType
;
use
Drupal\Core\Entity\EntityStorageInterface
;
/**
...
...
This diff is collapsed.
Click to expand it.
src/Form/LayoutOptionForm.php
+
3
−
4
View file @
32025ad7
...
...
@@ -146,17 +146,16 @@ class LayoutOptionForm extends EntityForm implements ContainerInjectionInterface
}
/**
*
* AJAX callback to update the default breakpoints element when the selection
* changes.
*
* @param array $form
* An associative array containing the structure of the form.
*
An associative array containing the structure of the form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
The current state of the form.
*
* @return array
* The default breakpoints element render array.
*
The default breakpoints element render array.
*/
public
function
replaceDefaultBreakpointsOptions
(
array
$form
,
FormStateInterface
$form_state
)
{
return
$form
[
'default_breakpoints'
];
...
...
This diff is collapsed.
Click to expand it.
src/Plugin/Layout/BootstrapLayout.php
+
4
−
4
View file @
32025ad7
...
...
@@ -13,7 +13,6 @@ use Drupal\Core\Entity\EntityTypeManagerInterface;
use
Drupal\bootstrap_styles
\StylesGroup\StylesGroupManager
;
use
Drupal\Core\Ajax\AjaxResponse
;
use
Drupal\Core\Ajax\ReplaceCommand
;
use
Drupal\Core\Ajax\SettingsCommand
;
use
Drupal\Core\Render\Element
;
use
Drupal\bootstrap_styles
\Ajax\RefreshResponsive
;
...
...
@@ -384,7 +383,8 @@ class BootstrapLayout extends LayoutDefault implements ContainerFactoryPluginInt
$default_value
=
NULL
;
if
(
$this
->
configuration
[
'breakpoints'
]
&&
isset
(
$this
->
configuration
[
'breakpoints'
][
$breakpoint_id
]))
{
$default_value
=
$this
->
configuration
[
'breakpoints'
][
$breakpoint_id
];
}
else
{
}
else
{
$options
=
$this
->
entityTypeManager
->
getStorage
(
'blb_layout_option'
)
->
loadByProperties
([
'layout_id'
=>
$layout_id
]);
foreach
(
$options
as
$layoutOption
)
{
if
(
array_search
(
$breakpoint
->
id
(),
$layoutOption
->
getDefaultBreakpointsIds
())
!==
FALSE
)
{
...
...
@@ -507,7 +507,7 @@ class BootstrapLayout extends LayoutDefault implements ContainerFactoryPluginInt
}
/**
*
*
*/
public
function
addAjaxLivePreviewToElements
(
array
&
$element
)
{
$types
=
[
...
...
@@ -537,7 +537,7 @@ class BootstrapLayout extends LayoutDefault implements ContainerFactoryPluginInt
}
/**
*
*
*/
public
function
livePreviewCallback
(
array
$form
,
FormStateInterface
$form_state
)
{
$form_state
->
getFormObject
()
->
submitForm
(
$form
,
$form_state
);
...
...
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