EclipseGc

Untitled

Mar 13th, 2012
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.41 KB | None | 0 0
  1. function block_load($plugin_id, $conf = array()) {
  2.   try {
  3.     $block = plugin()->getPluginInstance('core', 'block', array('config' => $plugin_id));
  4.   }
  5.   catch (Drupal\Core\Plugin\MapperException $e) {
  6.     // @TODO: Write a custom verified storage class that can have the conf
  7.     // array passed to it so that we can generate one off blocks from pure php
  8.     // array as configuration.
  9.   }
  10.   return $block;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment