本文整理匯總了PHP中Zend\View\Renderer\PhpRenderer::dojo方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhpRenderer::dojo方法的具體用法?PHP PhpRenderer::dojo怎麽用?PHP PhpRenderer::dojo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Zend\View\Renderer\PhpRenderer
的用法示例。
在下文中一共展示了PhpRenderer::dojo方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testViewHelperPersist
public function testViewHelperPersist()
{
$view = new PhpRenderer();
$view->setHelperPluginManager($this->serviceManager->get('ViewHelperManager'));
$view->dojo()->activate();
$headLink = $view->headLink();
$this->assertEquals('js/dojo_rel/dojo/resources/dojo.css', $headLink[0]->href);
$this->assertEquals('screen', $headLink[0]->media);
$this->assertEquals('stylesheet', $headLink[0]->rel);
$this->assertEquals('text/css', $headLink[0]->type);
$this->assertEquals('js/dojo_rel/dijit/themes/claro/claro.css', $headLink[1]->href);
$this->assertEquals('screen', $headLink[1]->media);
$this->assertEquals('stylesheet', $headLink[1]->rel);
$this->assertEquals('text/css', $headLink[1]->type);
$headScript = $view->headScript();
$this->assertEquals('async: true, baseUrl: "js/dojo_rel/dojo"', $headScript[0]->attributes['data-dojo-config']);
$this->assertEquals('js/dojo_rel/dojo/dojo.js', $headScript[0]->attributes['src']);
$this->assertEquals('text/javascript', $headScript[0]->type);
$this->assertEquals("require(['dojo/parser', 'dojo/domReady!'], function(parser) {parser.parse();})", $headScript[1]->source);
$this->assertEquals('text/javascript', $headScript[1]->type);
$this->assertEquals('claro', $view->dojo()->getTheme());
}