Skip to main content

Blocks

DrevOps\BehatSteps\Steps\Drupal\BlockTrait - Source, Steps

Manage Drupal blocks.

public function blockApplyConfiguration(EntityStubInterface $block, array $configuration): void

Apply a configuration to a block and save it

public function blockCreate(string $admin_label): EntityStubInterface

Create a block in the default theme from the plugin with an admin label

public function blockFindByLabel(string $label): ?EntityStubInterface

Find a block by its label

public function blockGetByLabel(string $label): EntityStubInterface

Return the block carrying a label

public function blockSetVisibilityCondition(EntityStubInterface $block, string $condition, array $configuration): void

Set a visibility condition on a block and save it

public function blockUnsetVisibilityCondition(EntityStubInterface $block, string $condition): void

Remove a visibility condition from a block and save it