
| Current Path : /var/www/html/rocksensor/web/core/modules/block/src/Plugin/ConfigAction/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/rocksensor/web/core/modules/block/src/Plugin/ConfigAction/PlaceBlockDeriver.php |
<?php
declare(strict_types=1);
namespace Drupal\block\Plugin\ConfigAction;
use Drupal\Component\Plugin\Derivative\DeriverBase;
/**
* Defines a deriver for the `placeBlock` config action.
*
* This creates two actions: `placeBlockInDefaultTheme`, and
* `placeBlockInAdminTheme`. They behave identically except for which theme
* they target.
*/
final class PlaceBlockDeriver extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives['placeBlockInAdminTheme'] = [
'which_theme' => 'admin',
] + $base_plugin_definition;
$this->derivatives['placeBlockInDefaultTheme'] = [
'which_theme' => 'default',
] + $base_plugin_definition;
return parent::getDerivativeDefinitions($base_plugin_definition);
}
}