protected function GlobalSettingsTrait::setCollapsiblockGlobalSetting in Collapsiblock 3.x
Same name and namespace in other branches
- 4.x tests/src/Traits/GlobalSettingsTrait.php \Drupal\Tests\collapsiblock\Traits\GlobalSettingsTrait::setCollapsiblockGlobalSetting()
Set a specific Collapsiblock global setting.
Parameters
mixed $newValue: The configuration to set.
string $key: Which setting to set.
4 calls to GlobalSettingsTrait::setCollapsiblockGlobalSetting()
- BlockInstanceTest::testBlockInstanceConfigOutput in tests/
src/ Functional/ BlockInstanceTest.php - Test that block instance configuration is output to pages.
- GlobalConfigurationTest::testGlobalConfigOutput in tests/
src/ Functional/ GlobalConfigurationTest.php - Test global configuration is output to pages.
- SlideTypeTest::testFadeAndSlideSlideType in tests/
src/ FunctionalJavascript/ SlideTypeTest.php - Test the "Fade and Slide" slide type does NOT set aria-hidden attributes.
- SlideTypeTest::testSlideSlideType in tests/
src/ FunctionalJavascript/ SlideTypeTest.php - Test that the "Slide" slide type does set aria-hidden attributes.
File
- tests/
src/ Traits/ GlobalSettingsTrait.php, line 52
Class
- GlobalSettingsTrait
- Simplify working with global Collapsiblock settings.
Namespace
Drupal\Tests\collapsiblock\TraitsCode
protected function setCollapsiblockGlobalSetting($newValue, $key = '') {
$this
->getCollapsiblockGlobalConfig()
->set($key, $newValue)
->save();
}