Example #1
0
 /**
  * String representation of dojo environment
  *
  * @return string
  */
 public function __toString()
 {
     if (!$this->isEnabled()) {
         return '';
     }
     $this->_isXhtml = $this->view->plugin('doctype')->isXhtml();
     if (DojoHelper::useDeclarative()) {
         if (null === $this->getDjConfigOption('parseOnLoad')) {
             $this->setDjConfigOption('parseOnLoad', true);
         }
     }
     if (!empty($this->_dijits)) {
         $this->registerDijitLoader();
     }
     $html = $this->_renderStylesheets() . PHP_EOL . $this->_renderDjConfig() . PHP_EOL . $this->_renderDojoScriptTag() . PHP_EOL . $this->_renderLayers() . PHP_EOL . $this->_renderExtras();
     return $html;
 }
Example #2
0
 public function testShouldAllowSpecifyingDeclarativeUsage()
 {
     DojoHelper::setUseDeclarative();
     $this->assertTrue(DojoHelper::useDeclarative());
 }
Example #3
0
 /**
  * Whether or not to use declarative dijit creation
  *
  * @return bool
  */
 protected function _useDeclarative()
 {
     return Dojo::useDeclarative();
 }