Answers for "Drupal 9 how to pass arguments to custom blocks"

PHP
0

Drupal 9 how to pass arguments to custom blocks

$block_vals = [
'campaign_id' => $camp_id, 'campaign_hash' => $camp_hash
];

// block manager service available in this example at $this->bm 
$ra = $this->bm->createInstance('your_block_id', $block_vals)->build();
Posted by: Guest on August-13-2021

Code answers related to "Drupal 9 how to pass arguments to custom blocks"

Browse Popular Code Answers by Language