public function PdbBlock::attachSettings in Decoupled Blocks 8
Attaches JavaScript settings required by the component.
Parameters
array $component: The component definition.
Return value
array Array of attachments.
Overrides FrameworkAwareBlockInterface::attachSettings
2 calls to PdbBlock::attachSettings()
- Ng2Block::attachSettings in modules/
pdb_ng2/ src/ Plugin/ Block/ Ng2Block.php - Attaches JavaScript settings required by the component.
- PdbBlock::build in src/
Plugin/ Block/ PdbBlock.php - Builds and returns the renderable array for this block plugin.
3 methods override PdbBlock::attachSettings()
- EmberBlock::attachSettings in modules/
pdb_ember/ src/ Plugin/ Block/ EmberBlock.php - Attaches JavaScript settings required by the component.
- Ng2Block::attachSettings in modules/
pdb_ng2/ src/ Plugin/ Block/ Ng2Block.php - Attaches JavaScript settings required by the component.
- ReactBlock::attachSettings in modules/
pdb_react/ src/ Plugin/ Block/ ReactBlock.php - Attaches JavaScript settings required by the component.
File
- src/
Plugin/ Block/ PdbBlock.php, line 131
Class
- PdbBlock
- Class PdbBlock.
Namespace
Drupal\pdb\Plugin\BlockCode
public function attachSettings(array $component) {
if (isset($component['settings'])) {
return [
'drupalSettings' => $component['settings'],
];
}
else {
return [];
}
}