public function addCustomBlock($type, array $params, $paramtype)
    {
        $callback = $this->customPlugins[$type]['callback'];
        if (is_array($callback)) {
            $class = is_object($callback[0]) ? get_class($callback[0]) : $callback[0];
        } else {
            $class = $callback;
        }

        $params = $this->mapParams($params, array($class, 'init'), $paramtype);

        $this->stack[]  = array(
            'type'   => $type,
            'params' => $params,
            'custom' => true,
            'class'  => $class,
            'buffer' => null
        );
        $this->curBlock = &$this->stack[count($this->stack) - 1];

        return call_user_func(array($class, 'preProcessing'), $this, $params, '', '', $type);
    }
public function addCustomBlock($type, array $params, $paramtype)
    {
        $callback = $this->customPlugins[$type]['callback'];
        if (is_array($callback)) {
            $class = is_object($callback[0]) ? get_class($callback[0]) : $callback[0];
        } else {
            $class = $callback;
        }

        $params = $this->mapParams($params, array($class, 'init'), $paramtype);

        $this->stack[]  = array(
            'type'   => $type,
            'params' => $params,
            'custom' => true,
            'class'  => $class,
            'buffer' => null
        );
        $this->curBlock = &$this->stack[count($this->stack) - 1];

        return call_user_func(array($class, 'preProcessing'), $this, $params, '', '', $type);
    }
public function addCustomBlock ( $ type , array $ params , $ paramtype ) { $ callback = $ this -> customPlugins [ $ type ] [ 'callback' ] ; if ( is_array ( $ callback ) ) { $ class = is_object ( $ callback [ 0 ] ) ? get_class ( $ callback [ 0 ] ) : $ callback [ 0 ] ; } else { $ class = $ callback ; } $ params = $ this -> mapParams ( $ params , array ( $ class , 'init' ) , $ paramtype ) ; $ this -> stack [ ] = array ( 'type' => $ type , 'params' => $ params , 'custom' => true , 'class' => $ class , 'buffer' => null ) ; $ this -> curBlock = & $ this -> stack [ count ( $ this -> stack ) - 1 ] ; return call_user_func ( array ( $ class , 'preProcessing' ) , $ this , $ params , '' , '' , $ type ) ; }
Adds a custom block to the top of the block stack.

@param string $type      block type (name)
@param array  $params    the parameters array
@param int    $paramtype the parameters type (see mapParams), 0, 1 or 2

@return string the preProcessing() method's output
Adds a custom block to the top of the block stack .