Perforce Chronicle 2012.2/486814
API Documentation

P4Cms_View_Helper_Dojo Class Reference

Derivative of dojo view helper designed that provides control over what dojo elements are rendered. More...

List of all members.

Public Member Functions

 __construct ()
 Use our configurable dojo container helper.
 dojo ($elements=null)
 Set elements to render.
 getContainer ()
 Retrieve dojo view helper container (holds dojo data and rendering logic).
 setContainer ($container)
 Retrieve dojo view helper container (holds dojo data and rendering logic).

Detailed Description

Derivative of dojo view helper designed that provides control over what dojo elements are rendered.

Copyright:
2011-2012 Perforce Software. All rights reserved
License:
Please see LICENSE.txt in top-level folder of this distribution.
Version:
2012.2/486814

Constructor & Destructor Documentation

P4Cms_View_Helper_Dojo::__construct ( )

Use our configurable dojo container helper.

Returns:
void
    {
        $registry = Zend_Registry::getInstance();
        if (!isset($registry[__CLASS__])) {
            require_once 'P4Cms/View/Helper/Dojo/Container.php';
            $container = new P4Cms_View_Helper_Dojo_Container();
            $registry[__CLASS__] = $container;
        }
        $this->_container = $registry[__CLASS__];
    }

Member Function Documentation

P4Cms_View_Helper_Dojo::dojo ( elements = null)

Set elements to render.

Parameters:
array$elementsOptional elements to render
Returns:
SOMETHING
    {
        if ($elements !== null) {
            $this->_container->setRender((array) $elements);
        } else {
            $this->_container->setRender(
                array(
                    'config',
                    'scriptTag',
                    'extras',
                    'layers',
                    'stylesheets'
                )
            );
        }

        return parent::dojo();
    }
P4Cms_View_Helper_Dojo::getContainer ( )

Retrieve dojo view helper container (holds dojo data and rendering logic).

Returns:
Zend_Dojo_View_Helper_Dojo_Container
    {
        return $this->_container;
    }
P4Cms_View_Helper_Dojo::setContainer ( container)

Retrieve dojo view helper container (holds dojo data and rendering logic).

Parameters:
Zend_Dojo_View_Helper_Dojo_Container$containerthe container to use.
Returns:
P4Cms_View_Helper_Dojo provides fluent interface.
    {
        $this->_container = $container;
        return $this;
    }

The documentation for this class was generated from the following file: