2
0

Zend_Dojo-View.xml 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.dojo.view" xmlns:xi="http://www.w3.org/2001/XInclude">
  4. <title>Dojo View Helpers</title>
  5. <para>
  6. Zend Framework provides the following Dojo-specific view helpers:
  7. </para>
  8. <itemizedlist>
  9. <listitem><para>
  10. <emphasis>dojo():</emphasis> setup the Dojo environment
  11. for your page, including dojo configuration values, custom module
  12. paths, module require statements, theme stylesheets, CDN usage, and more.
  13. </para></listitem>
  14. </itemizedlist>
  15. <example id="zend.dojo.view.setup">
  16. <title>Using Dojo View Helpers</title>
  17. <para>
  18. To use Dojo view helpers, you will need to tell your view object
  19. where to find them. You can do this by calling
  20. <code>addHelperPath()</code>:
  21. </para>
  22. <programlisting language="php"><![CDATA[
  23. $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
  24. ]]></programlisting>
  25. <para>
  26. Alternately, you can use <classname>Zend_Dojo</classname>'s
  27. <code>enableView()</code> method to do the work for you:
  28. </para>
  29. <programlisting language="php"><![CDATA[
  30. Zend_Dojo::enableView($view);
  31. ]]></programlisting>
  32. </example>
  33. <xi:include href="Zend_Dojo-View-Dojo.xml" />
  34. <xi:include href="Zend_Dojo-View-Helpers.xml" />
  35. </sect1>
  36. <!--
  37. vim:se ts=4 sw=4 et:
  38. -->