2
0

Zend_Dojo-View.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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>
  10. <para>
  11. <emphasis><methodname>dojo()</methodname>:</emphasis> setup the Dojo environment
  12. for your page, including dojo configuration values, custom module paths, module
  13. require statements, theme stylesheets, <acronym>CDN</acronym> usage, and more.
  14. </para>
  15. </listitem>
  16. </itemizedlist>
  17. <example id="zend.dojo.view.setup">
  18. <title>Using Dojo View Helpers</title>
  19. <para>
  20. To use Dojo view helpers, you will need to tell your view object
  21. where to find them. You can do this by calling
  22. <methodname>addHelperPath()</methodname>:
  23. </para>
  24. <programlisting language="php"><![CDATA[
  25. $view->addHelperPath('Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');
  26. ]]></programlisting>
  27. <para>
  28. Alternately, you can use <classname>Zend_Dojo</classname>'s
  29. <methodname>enableView()</methodname> method to do the work for you:
  30. </para>
  31. <programlisting language="php"><![CDATA[
  32. Zend_Dojo::enableView($view);
  33. ]]></programlisting>
  34. </example>
  35. <xi:include href="Zend_Dojo-View-Dojo.xml" />
  36. <xi:include href="Zend_Dojo-View-Helpers.xml" />
  37. </sect1>
  38. <!--
  39. vim:se ts=4 sw=4 et:
  40. -->