1.20.x layout.module layout_create_handler($plugin_type, $plugin_name, array $config = array())

Helper function to instantiate handlers when loading from config.

Parameters

string $plugin_type: The type of plugin being loaded, i.e. 'context', 'access', etc.

string $plugin_name: The name of the plugin, as keyed by that plugin type's info hooks.

array $config: The configuration options for the handler being created.

Return value

A handler object instance of the specified plugin type.:

File

modules/layout/layout.module, line 1739
The Layout module creates pages and wraps existing pages in layouts.

Code

function layout_create_handler($plugin_type, $plugin_name, array $config = array()) {
  $handler_name = layout_get_handler_name($plugin_type, $plugin_name);
  return new $handler_name($plugin_name, $config);
}