You are here

protected function InstanceSettingsTrait::getCollapsiblockBlockInstanceSetting in Collapsiblock 3.x

Same name and namespace in other branches
  1. 4.x tests/src/Traits/InstanceSettingsTrait.php \Drupal\Tests\collapsiblock\Traits\InstanceSettingsTrait::getCollapsiblockBlockInstanceSetting()

Get a specific Collapsiblock instance setting.

Parameters

\Drupal\block\BlockInterface $block: The block instance to get the setting from.

string $key: The key of the setting to get. Will be automatically prefixed with '"third_party.collapsiblock.'.

Return value

mixed The value of the given Collapsiblock block instance setting.

File

tests/src/Traits/InstanceSettingsTrait.php, line 35

Class

InstanceSettingsTrait
Simplify working with Collapsiblock settings attached to a specific block.

Namespace

Drupal\Tests\collapsiblock\Traits

Code

protected function getCollapsiblockBlockInstanceSetting(BlockInterface $block, $key = '') {
  return $this
    ->config($block
    ->getConfigDependencyName())
    ->get("third_party_settings.collapsiblock.{$key}");
}