1 layout.api.php hook_layout_renderer_info()

Returns information about Layout renderers.

Layout renderers are classes which are responsible for processing a $layout object and rendering it as HTML. By default, Layout module provides two renderers, one for the front-end display and one for the administration of a layout. Alternative renderers could be provided to provide data in different formats, provide alternative UIs, or return specific blocks rather than the entire layout.

Return value

array: Each item in the returned array of info should have the following keys:

  • class: The name of a class that provides the renderer. Classes usually extend the LayoutStandard class.

See also

hook_autoload_info()

layout_layout_renderer_info()

Related topics

File

core/modules/layout/layout.api.php, line 194
Describe hooks provided by the Layout module.

Code

function hook_layout_renderer_info() {
  $info['my_renderer'] = array(
    'class' => 'MyModuleLayoutRenderer',
  );

  return $info;
}