Dojo/View/Helper/Dojo/Container.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Dojo
- Subpackage
- View
- Version
- $Id: Container.php 24593 2012-01-05 20:35:02Z matthew $
\Zend_Dojo_View_Helper_Dojo_Container
Container for Dojo View Helper
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties


string $_cdnBase = \Zend_Dojo::CDN_BASE_GOOGLE
Base CDN url to utilize
\Zend_Dojo::CDN_BASE_GOOGLE
Details- Type
- string


string $_cdnDojoPath = \Zend_Dojo::CDN_DOJO_PATH_GOOGLE
Path segment following version string of CDN path
\Zend_Dojo::CDN_DOJO_PATH_GOOGLE
Details- Type
- string


bool $_dijitLoaderRegistered = false
Has the dijit loader been registered?
false
Details- Type
- bool


array $_javascriptStatements = array()
Arbitrary javascript to include in dojo script
array()
Details- Type
- array


string $_localRelativePath = null
Root of dojo where all dojo files are installed
null
Details- Type
- string


array $_onLoadActions = array()
Actions to perform on window load
array()
Details- Type
- array


bool $_registerDojoStylesheet = false
Register the Dojo stylesheet?
false
Details- Type
- bool


array $_stylesheetModules = array()
Style sheet modules to load
array()
Details- Type
- array


array $_zendLoadActions = array()
Array of onLoad events specific to Zend_Dojo integration operations
array()
Details- Type
- array
Methods


_addZendLoad(string $callback) : \Zend_Dojo_View_Helper_Dojo_Container
Add an onLoad action related to ZF dijit creation
This method is public, but prefixed with an underscore to indicate that it should not normally be called by userland code. It is pertinent to ensuring that the correct order of operations occurs during dijit creation.
Name | Type | Description |
---|---|---|
$callback | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


_getLocalRelativePath() : string
Retrieve local path to dojo resources for building relative paths
Type | Description |
---|---|
string |


_renderDojoScriptTag() : string
Render dojo script tag
Renders Dojo script tag by utilizing either local path provided or the CDN. If any djConfig values were set, they will be serialized and passed with that attribute.
Type | Description |
---|---|
string |


_renderLayers() : string
Render layers (custom builds) as script tags
Type | Description |
---|---|
string |


addDijit(string $id, array $params) : \Zend_Dojo_View_Helper_Dojo_Container
Add a programmatic dijit
Name | Type | Description |
---|---|---|
$id | string | |
$params | array |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


addDijits(array $dijits) : \Zend_Dojo_View_Helper_Dojo_Container
Add multiple dijits at once
Expects an array of id => array $params pairs
Name | Type | Description |
---|---|---|
$dijits | array |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


addJavascript(string $js) : \Zend_Dojo_View_Helper_Dojo_Container
Add arbitrary javascript to execute in dojo JS container
Name | Type | Description |
---|---|---|
$js | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


addLayer(string $path) : \Zend_Dojo_View_Helper_Dojo_Container
Add layer (custom build) path
Name | Type | Description |
---|---|---|
$path | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


addOnLoad(string $callback) : \Zend_Dojo_View_Helper_Dojo_Container
Add a script to execute onLoad
dojo.addOnLoad accepts: - function name - lambda
Name | Type | Description |
---|---|---|
$callback | string | Lambda |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


addStylesheet(string $path) : \Zend_Dojo_View_Helper_Dojo_Container
Add a stylesheet
Name | Type | Description |
---|---|---|
$path | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


addStylesheetModule(string $module) : \Zend_Dojo_View_Helper_Dojo_Container
Add a stylesheet by module name
Name | Type | Description |
---|---|---|
$module | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


clearDijits() : \Zend_Dojo_View_Helper_Dojo_Container
Clear all dijits
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


clearJavascript() : \Zend_Dojo_View_Helper_Dojo_Container
Clear arbitrary javascript stack
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


clearLayers() : \Zend_Dojo_View_Helper_Dojo_Container
Clear all registered layers
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


disable() : \Zend_Dojo_View_Helper_Dojo_Container
Disable dojo
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


enable() : \Zend_Dojo_View_Helper_Dojo_Container
Enable dojo
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


getCdnDojoPath() : string
Get CDN path to dojo (relative to CDN base + version)
Type | Description |
---|---|
string |


getDijit(string $id) : array | null
Retrieve a dijit by id
Name | Type | Description |
---|---|---|
$id | string |
Type | Description |
---|---|
array | null |


getDijits() : array
Retrieve all dijits
Returns dijits as an array of assoc arrays
Type | Description |
---|---|
array |


getDjConfigOption(string $option, mixed $default = null) : mixed
Get dojo configuration value
Name | Type | Description |
---|---|---|
$option | string | |
$default | mixed |
Type | Description |
---|---|
mixed |


getStylesheetModules() : array
Get all stylesheet modules currently registered
Type | Description |
---|---|
array |


hasDijit(string $id) : bool
Is the given programmatic dijit already registered?
Name | Type | Description |
---|---|---|
$id | string |
Type | Description |
---|---|
bool |


javascriptCaptureEnd() : true
Finish capturing arbitrary javascript to include in dojo script
Type | Description |
---|---|
true |


prependOnLoad(string $callback) : \Zend_Dojo_View_Helper_Dojo_Container
Prepend an onLoad event to the list of onLoad actions
Name | Type | Description |
---|---|---|
$callback | string | Lambda |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


registerDojoStylesheet(null | bool $flag = null) : \Zend_Dojo_View_Helper_Dojo_Container | bool
Register the dojo.css stylesheet?
With no arguments, returns the status of the flag; with arguments, sets the flag and returns the object.
Name | Type | Description |
---|---|---|
$flag | null | bool |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container | bool |


registerModulePath(string $module, string $path) : \Zend_Dojo_View_Helper_Dojo_Container
Register a module path
Name | Type | Description |
---|---|---|
$module | string | The module to register a path for |
$path | string | The path to register for the module |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


removeDijit(string $id) : \Zend_Dojo_View_Helper_Dojo_Container
Remove a programmatic dijit if it exists
Name | Type | Description |
---|---|---|
$id | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


removeLayer(string $path) : \Zend_Dojo_View_Helper_Dojo_Container
Remove a registered layer
Name | Type | Description |
---|---|---|
$path | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


requireModule(string | array $modules) : \Zend_Dojo_View_Helper_Dojo_Container
Specify one or multiple modules to require
Name | Type | Description |
---|---|---|
$modules | string | array |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


setCdnBase(string $url) : \Zend_Dojo_View_Helper_Dojo_Container
Set CDN base path
Name | Type | Description |
---|---|---|
$url | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


setCdnDojoPath(string $path) : \Zend_Dojo_View_Helper_Dojo_Container
Set CDN path to dojo (relative to CDN base + version)
Name | Type | Description |
---|---|---|
$path | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


setCdnVersion(string $version = null) : \Zend_Dojo_View_Helper_Dojo_Container
Use CDN, using version specified
Name | Type | Description |
---|---|---|
$version | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


setDijit(string $id, array $params) : \Zend_Dojo_View_Helper_Dojo_Container
Set a programmatic dijit (overwrites)
Name | Type | Description |
---|---|---|
$id | string | |
$params | array |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


setDijits(array $dijits) : \Zend_Dojo_View_Helper_Dojo_Container
Set multiple dijits at once (overwrites)
Expects an array of id => array $params pairs
Name | Type | Description |
---|---|---|
$dijits | array |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


setDjConfig( $config) : \Zend_Dojo_View_Helper_Dojo_Container
Set Dojo configuration
Name | Type | Description |
---|---|---|
$config |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


setDjConfigOption(string $option, mixed $value) : \Zend_Dojo_View_Helper_Dojo_Container
Set Dojo configuration option
Name | Type | Description |
---|---|---|
$option | string | |
$value | mixed |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


setLocalPath(string $path) : \Zend_Dojo_View_Helper_Dojo_Container
Set path to local dojo
Name | Type | Description |
---|---|---|
$path | string |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


setOptions(array | \Zend_Config $options) : \Zend_Dojo_View_Helper_Dojo_Container
Add options for the Dojo Container to use
Name | Type | Description |
---|---|---|
$options | array | \Zend_Config | Array or Zend_Config object with options to use |
Type | Description |
---|---|
\Zend_Dojo_View_Helper_Dojo_Container |


setView(\Zend_Dojo_View_Interface $view) : void
Set view object
Name | Type | Description |
---|---|---|
$view | \Zend_Dojo_View_Interface |