Dojo/View/Helper/Dojo/Container.php

Show: PublicProtectedPrivateinherited
Table of Contents
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 license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Dojo  
Subpackage
View  
Version
$Id$  

\Zend_Dojo_View_Helper_Dojo_Container

Package: Zend_Dojo\View
Container for Dojo View Helper
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedbool $_captureLock = false
addOnLoad capture lock
Default valuefalseDetails
Type
bool
>VPropertyprotectedstring $_captureObj
addOnLoad object on which to apply lambda
Details
Type
string
>VPropertyprotectedstring $_cdnBase = \Zend_Dojo::CDN_BASE_GOOGLE
Base CDN url to utilize
Default value\Zend_Dojo::CDN_BASE_GOOGLEDetails
Type
string
>VPropertyprotectedstring $_cdnDojoPath = \Zend_Dojo::CDN_DOJO_PATH_GOOGLE
Path segment following version string of CDN path
Default value\Zend_Dojo::CDN_DOJO_PATH_GOOGLEDetails
Type
string
>VPropertyprotectedstring $_cdnVersion = '1.5.0'
Dojo version to use from CDN
Default value'1.5.0'Details
Type
string
>VPropertyprotectedbool $_dijitLoaderRegistered = false
Has the dijit loader been registered?
Default valuefalseDetails
Type
bool
>VPropertyprotectedarray $_dijits = array()
Registered programmatic dijits
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_djConfig = array()
Dojo configuration
Default valuearray()Details
Type
array
>VPropertyprotectedbool $_enabled = false
Whether or not dojo is enabled
Default valuefalseDetails
Type
bool
>VPropertyprotectedbool $_isXhtml = false
Are we rendering as XHTML?
Default valuefalseDetails
Type
bool
>VPropertyprotectedarray $_javascriptStatements = array()
Arbitrary javascript to include in dojo script
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_layers = array()
Dojo layers (custom builds) to use
Default valuearray()Details
Type
array
>VPropertyprotectedstring $_localPath = null
Relative path to dojo
Default valuenullDetails
Type
string
>VPropertyprotectedstring $_localRelativePath = null
Root of dojo where all dojo files are installed
Default valuenullDetails
Type
string
>VPropertyprotectedarray $_modulePaths = array()
Registered module paths
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_modules = array()
Modules to require
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_onLoadActions = array()
Actions to perform on window load
Default valuearray()Details
Type
array
>VPropertyprotectedbool $_registerDojoStylesheet = false
Register the Dojo stylesheet?
Default valuefalseDetails
Type
bool
>VPropertyprotectedarray $_stylesheetModules = array()
Style sheet modules to load
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_stylesheets = array()
Local stylesheets
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_zendLoadActions = array()
Array of onLoad events specific to Zend_Dojo integration operations
Default valuearray()Details
Type
array
>VPropertypublic\Zend_View_Interface $view

Methods

methodpublic__toString() : string

String representation of dojo environment

Returns
TypeDescription
string
methodpublic_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.
Parameters
NameTypeDescription
$callbackstring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodprotected_getLocalRelativePath() : string

Retrieve local path to dojo resources for building relative paths

Returns
TypeDescription
string
methodpublic_getZendLoadActions() : array

Retrieve all ZF dijit callbacks

Returns
TypeDescription
array
methodprotected_renderDjConfig() : string

Render DjConfig values

Returns
TypeDescription
string
methodprotected_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.
Returns
TypeDescription
string
methodprotected_renderExtras() : string

Render dojo module paths and requires

Returns
TypeDescription
string
methodprotected_renderLayers() : string

Render layers (custom builds) as script tags

Returns
TypeDescription
string
methodprotected_renderStylesheets() : string

Render dojo stylesheets

Returns
TypeDescription
string
methodpublicaddDijit(string $id, array $params) : \Zend_Dojo_View_Helper_Dojo_Container

Add a programmatic dijit

Parameters
NameTypeDescription
$idstring
$paramsarray
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicaddDijits(array $dijits) : \Zend_Dojo_View_Helper_Dojo_Container

Add multiple dijits at once

Expects an array of id => array $params pairs
Parameters
NameTypeDescription
$dijitsarray
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicaddJavascript(string $js) : \Zend_Dojo_View_Helper_Dojo_Container

Add arbitrary javascript to execute in dojo JS container

Parameters
NameTypeDescription
$jsstring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicaddLayer(string $path) : \Zend_Dojo_View_Helper_Dojo_Container

Add layer (custom build) path

Parameters
NameTypeDescription
$pathstring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicaddOnLoad(string $callback) : \Zend_Dojo_View_Helper_Dojo_Container

Add a script to execute onLoad

dojo.addOnLoad accepts: - function name - lambda
Parameters
NameTypeDescription
$callbackstring

Lambda

Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicaddStylesheet(string $path) : \Zend_Dojo_View_Helper_Dojo_Container

Add a stylesheet

Parameters
NameTypeDescription
$pathstring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicaddStylesheetModule(string $module) : \Zend_Dojo_View_Helper_Dojo_Container

Add a stylesheet by module name

Parameters
NameTypeDescription
$modulestring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicclearDijits() : \Zend_Dojo_View_Helper_Dojo_Container

Clear all dijits

methodpublicclearJavascript() : \Zend_Dojo_View_Helper_Dojo_Container

Clear arbitrary javascript stack

methodpublicclearLayers() : \Zend_Dojo_View_Helper_Dojo_Container

Clear all registered layers

methodpublicdijitsToJson() : string

Render dijits as JSON structure

Returns
TypeDescription
string
methodpublicgetCdnBase() : string

Return CDN base URL

Returns
TypeDescription
string
methodpublicgetCdnDojoPath() : string

Get CDN path to dojo (relative to CDN base + version)

Returns
TypeDescription
string
methodpublicgetCdnVersion() : string

Get CDN version

Returns
TypeDescription
string
methodpublicgetDijit(string $id) : array | null

Retrieve a dijit by id

Parameters
NameTypeDescription
$idstring
Returns
TypeDescription
array | null
methodpublicgetDijits() : array

Retrieve all dijits

Returns dijits as an array of assoc arrays
Returns
TypeDescription
array
methodpublicgetDjConfig() : array

Retrieve dojo configuration values

Returns
TypeDescription
array
methodpublicgetDjConfigOption(string $option, mixed $default = null) : mixed

Get dojo configuration value

Parameters
NameTypeDescription
$optionstring
$defaultmixed
Returns
TypeDescription
mixed
methodpublicgetJavascript() : array

Return all registered javascript statements

Returns
TypeDescription
array
methodpublicgetLayers() : array

Get registered layers

Returns
TypeDescription
array
methodpublicgetLocalPath() : string

Get local path to dojo

Returns
TypeDescription
string
methodpublicgetModulePaths() : array

List registered module paths

Returns
TypeDescription
array
methodpublicgetModules() : array

Retrieve list of modules to require

Returns
TypeDescription
array
methodpublicgetOnLoadActions() : array

Retrieve all registered onLoad actions

Returns
TypeDescription
array
methodpublicgetStylesheetModules() : array

Get all stylesheet modules currently registered

Returns
TypeDescription
array
methodpublicgetStylesheets() : array

Retrieve registered stylesheets

Returns
TypeDescription
array
methodpublichasDijit(string $id) : bool

Is the given programmatic dijit already registered?

Parameters
NameTypeDescription
$idstring
Returns
TypeDescription
bool
methodpublicisEnabled() : bool

Is dojo enabled?

Returns
TypeDescription
bool
methodpublicjavascriptCaptureEnd() : true

Finish capturing arbitrary javascript to include in dojo script

Returns
TypeDescription
true
methodpublicjavascriptCaptureStart() : void

Capture arbitrary javascript to include in dojo script

methodpubliconLoadCaptureEnd() : bool

Stop capturing routines to run onLoad

Returns
TypeDescription
bool
methodpubliconLoadCaptureStart() : bool

Start capturing routines to run onLoad

Returns
TypeDescription
bool
methodpublicprependOnLoad(string $callback) : \Zend_Dojo_View_Helper_Dojo_Container

Prepend an onLoad event to the list of onLoad actions

Parameters
NameTypeDescription
$callbackstring

Lambda

Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicregisterDijitLoader() : void

Create dijit loader functionality

methodpublicregisterDojoStylesheet(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.
Parameters
NameTypeDescription
$flagnull | bool
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container | bool
methodpublicregisterModulePath(string $module, string $path) : \Zend_Dojo_View_Helper_Dojo_Container

Register a module path

Parameters
NameTypeDescription
$modulestring

The module to register a path for

$pathstring

The path to register for the module

Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicremoveDijit(string $id) : \Zend_Dojo_View_Helper_Dojo_Container

Remove a programmatic dijit if it exists

Parameters
NameTypeDescription
$idstring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicremoveLayer(string $path) : \Zend_Dojo_View_Helper_Dojo_Container

Remove a registered layer

Parameters
NameTypeDescription
$pathstring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicrequireModule(string | array $modules) : \Zend_Dojo_View_Helper_Dojo_Container

Specify one or multiple modules to require

Parameters
NameTypeDescription
$modulesstring | array
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicsetCdnBase(string $url) : \Zend_Dojo_View_Helper_Dojo_Container

Set CDN base path

Parameters
NameTypeDescription
$urlstring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicsetCdnDojoPath(string $path) : \Zend_Dojo_View_Helper_Dojo_Container

Set CDN path to dojo (relative to CDN base + version)

Parameters
NameTypeDescription
$pathstring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicsetCdnVersion(string $version = null) : \Zend_Dojo_View_Helper_Dojo_Container

Use CDN, using version specified

Parameters
NameTypeDescription
$versionstring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicsetDijit(string $id, array $params) : \Zend_Dojo_View_Helper_Dojo_Container

Set a programmatic dijit (overwrites)

Parameters
NameTypeDescription
$idstring
$paramsarray
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicsetDijits(array $dijits) : \Zend_Dojo_View_Helper_Dojo_Container

Set multiple dijits at once (overwrites)

Expects an array of id => array $params pairs
Parameters
NameTypeDescription
$dijitsarray
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicsetDjConfig( $config) : \Zend_Dojo_View_Helper_Dojo_Container

Set Dojo configuration

Parameters
NameTypeDescription
$config
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicsetDjConfigOption(string $option, mixed $value) : \Zend_Dojo_View_Helper_Dojo_Container

Set Dojo configuration option

Parameters
NameTypeDescription
$optionstring
$valuemixed
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicsetLocalPath(string $path) : \Zend_Dojo_View_Helper_Dojo_Container

Set path to local dojo

Parameters
NameTypeDescription
$pathstring
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicsetOptions( $options) : \Zend_Dojo_View_Helper_Dojo_Container

Add options for the Dojo Container to use

Parameters
NameTypeDescription
$options
Returns
TypeDescription
\Zend_Dojo_View_Helper_Dojo_Container
methodpublicsetView(\Zend_Dojo_View_Interface $view) : void

Set view object

Parameters
NameTypeDescription
$view\Zend_Dojo_View_Interface
methodpublicuseCdn() : bool

Are we using the CDN?

Returns
TypeDescription
bool
methodpublicuseLocalPath() : bool

Are we using a local path?

Returns
TypeDescription
bool
Documentation was generated by phpDocumentor 2.2.0 .