Skip to content
Snippets Groups Projects
Commit 32025ad7 authored by Mahmoud Zayed's avatar Mahmoud Zayed
Browse files

Remove unused statements& run code sniffer.

parent 31c4a0de
No related branches found
No related tags found
No related merge requests found
......@@ -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;
/**
......
......@@ -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'];
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment