You are here

function Smarty::register_block in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/lib/smarty/Smarty.class.php \Smarty::register_block()

Registers block function to be used in templates

Parameters

string $block name of template block:

string $block_impl PHP function to register:

File

includes/moodle/lib/smarty/Smarty.class.php, line 740

Class

Smarty
@package Smarty

Code

function register_block($block, $block_impl, $cacheable = true, $cache_attrs = null) {
  $this->_plugins['block'][$block] = array(
    $block_impl,
    null,
    null,
    false,
    $cacheable,
    $cache_attrs,
  );
}