Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function block_load($plugin_id, $conf = array()) {
- try {
- $block = plugin()->getPluginInstance('core', 'block', array('config' => $plugin_id));
- }
- catch (Drupal\Core\Plugin\MapperException $e) {
- // @TODO: Write a custom verified storage class that can have the conf
- // array passed to it so that we can generate one off blocks from pure php
- // array as configuration.
- }
- return $block;
- }
Advertisement
Add Comment
Please, Sign In to add comment