Swat/SwatCellRenderer.php
final protected function addCompositeRenderer(
        SwatCellRenderer $renderer,
        $key
    ) {
        if (array_key_exists($key, $this->composite_renderers)) {
            throw new SwatDuplicateIdException(
                sprintf(
                    "A composite renderer with the key '%s' already exists in " .
                        "this renderer.",
                    $key
                ),
                0,
                $key
            );
        }

        if ($renderer->parent !== null) {
            throw new SwatException(
                'Cannot add a composite renderer that ' .
                    'already has a parent.'
            );
        }

        $this->composite_renderers[$key] = $renderer;
        $renderer->parent = $this;
    }
final protected function addCompositeRenderer(
        SwatCellRenderer $renderer,
        $key
    ) {
        if (array_key_exists($key, $this->composite_renderers)) {
            throw new SwatDuplicateIdException(
                sprintf(
                    "A composite renderer with the key '%s' already exists in " .
                        "this renderer.",
                    $key
                ),
                0,
                $key
            );
        }

        if ($renderer->parent !== null) {
            throw new SwatException(
                'Cannot add a composite renderer that ' .
                    'already has a parent.'
            );
        }

        $this->composite_renderers[$key] = $renderer;
        $renderer->parent = $this;
    }
final protected function addCompositeRenderer ( SwatCellRenderer $ renderer , $ key ) { if ( array_key_exists ( $ key , $ this -> composite_renderers ) ) { throw new SwatDuplicateIdException ( sprintf ( "A composite renderer with the key '%s' already exists in " . "this renderer." , $ key ) , 0 , $ key ) ; } if ( $ renderer -> parent !== null ) { throw new SwatException ( 'Cannot add a composite renderer that ' . 'already has a parent.' ) ; } $ this -> composite_renderers [ $ key ] = $ renderer ; $ renderer -> parent = $ this ; }
Adds a composite a renderer to this renderer

@param SwatCellRenderer $renderer the composite renderer to add.
@param string $key a key identifying the renderer so it may be retrieved
later. The key has to be unique within this renderer
relative to the keys of other composite renderers.

@throws SwatDuplicateIdException if a composite renderer with the
specified key is already added to this
renderer.
@throws SwatException if the specified renderer is already the child of
another object.
Adds a composite a renderer to this renderer