You are here

protected function BetterExposedFiltersTrait::setBetterExposedOptions in Better Exposed Filters 8.5

Same name and namespace in other branches
  1. 8.4 tests/src/Traits/BetterExposedFiltersTrait.php \Drupal\Tests\better_exposed_filters\Traits\BetterExposedFiltersTrait::setBetterExposedOptions()

Merges options into existing BEF configuration.

Parameters

\Drupal\views\ViewExecutable $view: The view object.

array $options: The list of options (e.g. ['sort' => ['plugin_id' => 'default']]).

Throws

\Drupal\Core\Entity\EntityStorageException In case of failures an exception is thrown.

20 calls to BetterExposedFiltersTrait::setBetterExposedOptions()
BetterExposedFiltersKernelTest::testHideSubmitButtonOnAutoSubmit in tests/src/Kernel/BetterExposedFiltersKernelTest.php
Tests hiding the submit button when auto-submit is enabled.
BetterExposedFiltersKernelTest::testSecondaryOptions in tests/src/Kernel/BetterExposedFiltersKernelTest.php
Tests moving sorts, filters and pager options into secondary fieldset.
BetterExposedFiltersTest::testAutoSubmit in tests/src/FunctionalJavascript/BetterExposedFiltersTest.php
Tests if filtering via auto-submit works.
BetterExposedFiltersTest::testAutoSubmitWithExposedFormBlock in tests/src/FunctionalJavascript/BetterExposedFiltersTest.php
Tests if filtering via auto-submit works if exposed form is a block.
BetterExposedFiltersTest::testSecondaryOptions in tests/src/FunctionalJavascript/BetterExposedFiltersTest.php
Tests placing exposed filters inside a collapsible field-set.

... See full list

File

tests/src/Traits/BetterExposedFiltersTrait.php, line 37

Class

BetterExposedFiltersTrait
Makes Drupal's test API forward compatible with multiple versions of PHPUnit.

Namespace

Drupal\Tests\better_exposed_filters\Traits

Code

protected function setBetterExposedOptions(ViewExecutable $view, array $options) {
  $bef_options =& $this
    ->getBetterExposedOptions($view);
  $bef_options = NestedArray::mergeDeep($bef_options, $options);
  $view->storage
    ->save();
}