Skip to content
Zend Framework 2 module for Dojo 1.8 integration
PHP JavaScript Shell
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

WARNING this module is an abandoned mess. If there is anyone who wants to take it over, please just ask. For myself, I realised it was just easier to use zf2 and dojo without any integration code, you just don't need it.



DojoModule is a module for Zend Framework 2 that will enable easy use of Dojo 1.7.


DojoModule uses composer to install.

Add the following to your project root composer.json:

    "repositories": [{ "type": "composer", "url": "" }],
    "require": {
        "superdweebie/DojoModule": "dev-master"

Adding Required Modules

Add any dojo modules you want to use to the require array of a config file. Eg:

'sds' => array(
    'dojo' => array(
        'require' => array(

Adding Stylesheets

Add any dojo related css you want to use to the stylesheet array of a config file. Any [THEME] references will be replaced with the configured dojo theme name. Eg:

'sds' => array(
    'dojo' => array(
        'stylesheets' => array(
            'dojo/parser' => array(

Basic DojoModule Usage

If you wish to use dojo, place the following line at the beginning of your view script:


Also make sure the following lines are in your view script, after the activation call shown above:

<?php echo $this->headLink() ?>
<?php echo $this->headScript() ?>

Finally, get the theme for use in the body tag:

<body class="<?php echo $this->dojo()->getTheme();?>">

Dojo builds

Build profiles can be made by executing vendor/bin/dojo-module

Something went wrong with that request. Please try again.