/docs/api/_form_2_element_2_ui_widget_8php_source.html
HTML | 129 lines | 128 code | 0 blank | 1 comment | 0 complexity | e264104d76dc580046c0330ee0ff84df MD5 | raw file
Possible License(s): GPL-2.0, LGPL-3.0
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <title>openbiz: E:/E/GEAMP/www/openbiz/openbiz/others/ZendX/JQuery/Form/Element/UiWidget.php Source File</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <link href="doxygen.css" rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <!-- Generated by Doxygen 1.7.2 -->
- <div class="navigation" id="top">
- <div class="tabs">
- <ul class="tablist">
- <li><a href="main.html"><span>Main Page</span></a></li>
- <li><a href="pages.html"><span>Related Pages</span></a></li>
- <li><a href="namespaces.html"><span>Namespaces</span></a></li>
- <li><a href="annotated.html"><span>Data Structures</span></a></li>
- <li class="current"><a href="files.html"><span>Files</span></a></li>
- <li><a href="examples.html"><span>Examples</span></a></li>
- </ul>
- </div>
- <div class="tabs2">
- <ul class="tablist">
- <li><a href="files.html"><span>File List</span></a></li>
- </ul>
- </div>
- <div class="header">
- <div class="headertitle">
- <h1>E:/E/GEAMP/www/openbiz/openbiz/others/ZendX/JQuery/Form/Element/UiWidget.php</h1> </div>
- </div>
- <div class="contents">
- <div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <?php
- <a name="l00023"></a>00023 require_once <span class="stringliteral">"Zend/Form/Element.php"</span>;
- <a name="l00024"></a>00024
- <a name="l00033"></a><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html">00033</a> <span class="keyword">class </span><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html">ZendX_JQuery_Form_Element_UiWidget</a> <span class="keyword">extends</span> Zend_Form_Element
- <a name="l00034"></a>00034 {
- <a name="l00040"></a>00040 <span class="keyword">public</span> $jQueryParams = array();
- <a name="l00041"></a>00041
- <a name="l00047"></a>00047 <span class="keyword">public</span> $options = array();
- <a name="l00048"></a>00048
- <a name="l00056"></a><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#aa9eed1d9fc634994a3dc95bf7dc0f1db">00056</a> <span class="keyword">public</span> function <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#aa9eed1d9fc634994a3dc95bf7dc0f1db">__construct</a>($spec, $options = null)
- <a name="l00057"></a>00057 {
- <a name="l00058"></a>00058 $this->addPrefixPath(<span class="stringliteral">'ZendX_JQuery_Form_Decorator'</span>, <span class="stringliteral">'ZendX/JQuery/Form/Decorator'</span>, <span class="stringliteral">'decorator'</span>);
- <a name="l00059"></a>00059 <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#aa9eed1d9fc634994a3dc95bf7dc0f1db">parent::__construct</a>($spec, $options);
- <a name="l00060"></a>00060 }
- <a name="l00061"></a>00061
- <a name="l00068"></a><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#a6c8c2b9e77ad4aac0439a450e016bf23">00068</a> <span class="keyword">public</span> function <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#a6c8c2b9e77ad4aac0439a450e016bf23">getJQueryParam</a>($key)
- <a name="l00069"></a>00069 {
- <a name="l00070"></a>00070 $key = (string) $key;
- <a name="l00071"></a>00071 <span class="keywordflow">return</span> $this->jQueryParams[$key];
- <a name="l00072"></a>00072 }
- <a name="l00073"></a>00073
- <a name="l00079"></a><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#afe712b32b46bd47ad7979df3769c8194">00079</a> <span class="keyword">public</span> function <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#afe712b32b46bd47ad7979df3769c8194">getJQueryParams</a>()
- <a name="l00080"></a>00080 {
- <a name="l00081"></a>00081 <span class="keywordflow">return</span> $this->jQueryParams;
- <a name="l00082"></a>00082 }
- <a name="l00083"></a>00083
- <a name="l00091"></a><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#aa510d865afede2630cdbbf7d135b362e">00091</a> <span class="keyword">public</span> function <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#aa510d865afede2630cdbbf7d135b362e">setJQueryParam</a>($key, $value)
- <a name="l00092"></a>00092 {
- <a name="l00093"></a>00093 $key = (string) $key;
- <a name="l00094"></a>00094 $this->jQueryParams[$key] = $value;
- <a name="l00095"></a>00095 <span class="keywordflow">return</span> $this;
- <a name="l00096"></a>00096 }
- <a name="l00097"></a>00097
- <a name="l00104"></a><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#ae4e421bf84ba77ea2d39be1624ccd316">00104</a> <span class="keyword">public</span> function <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#ae4e421bf84ba77ea2d39be1624ccd316">setJQueryParams</a>($params)
- <a name="l00105"></a>00105 {
- <a name="l00106"></a>00106 $this->jQueryParams = array_merge($this->jQueryParams, $params);
- <a name="l00107"></a>00107 <span class="keywordflow">return</span> $this;
- <a name="l00108"></a>00108 }
- <a name="l00109"></a>00109
- <a name="l00115"></a><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#aa9e0138685a7ef88f4f670e379e7cae3">00115</a> <span class="keyword">public</span> function <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#aa9e0138685a7ef88f4f670e379e7cae3">loadDefaultDecorators</a>()
- <a name="l00116"></a>00116 {
- <a name="l00117"></a>00117 <span class="keywordflow">if</span> ($this->loadDefaultDecoratorsIsDisabled()) {
- <a name="l00118"></a>00118 <span class="keywordflow">return</span>;
- <a name="l00119"></a>00119 }
- <a name="l00120"></a>00120
- <a name="l00121"></a>00121 $decorators = $this-><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#a14709784de42ac1565c64a09debb7db8">getDecorators</a>();
- <a name="l00122"></a>00122 <span class="keywordflow">if</span> (empty($decorators)) {
- <a name="l00123"></a>00123 $this->addDecorator(<span class="stringliteral">'UiWidgetElement'</span>)
- <a name="l00124"></a>00124 ->addDecorator(<span class="stringliteral">'Errors'</span>)
- <a name="l00125"></a>00125 ->addDecorator(<span class="stringliteral">'Description'</span>, array(<span class="stringliteral">'tag'</span> => <span class="charliteral">'p'</span>, <span class="stringliteral">'class'</span> => <span class="stringliteral">'description'</span>))
- <a name="l00126"></a>00126 ->addDecorator(<span class="stringliteral">'HtmlTag'</span>, array(<span class="stringliteral">'tag'</span> => <span class="stringliteral">'dd'</span>))
- <a name="l00127"></a>00127 ->addDecorator(<span class="stringliteral">'Label'</span>, array(<span class="stringliteral">'tag'</span> => <span class="stringliteral">'dt'</span>));
- <a name="l00128"></a>00128 }
- <a name="l00129"></a>00129 }
- <a name="l00130"></a>00130
- <a name="l00139"></a><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#a6efcef1ebce82b7e972f451c92574b78">00139</a> <span class="keyword">public</span> function <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#a6efcef1ebce82b7e972f451c92574b78">setView</a>(<a class="code" href="interface_zend___view___interface.html">Zend_View_Interface</a> $view = null)
- <a name="l00140"></a>00140 {
- <a name="l00141"></a>00141 <span class="keywordflow">if</span> (null !== $view) {
- <a name="l00142"></a>00142 <span class="keywordflow">if</span> (<span class="keyword">false</span> === $view->getPluginLoader(<span class="stringliteral">'helper'</span>)->getPaths(<span class="stringliteral">'ZendX_JQuery_View_Helper'</span>)) {
- <a name="l00143"></a>00143 $view->addHelperPath(<span class="stringliteral">'ZendX/JQuery/View/Helper'</span>, <span class="stringliteral">'ZendX_JQuery_View_Helper'</span>);
- <a name="l00144"></a>00144 }
- <a name="l00145"></a>00145 }
- <a name="l00146"></a>00146 <span class="keywordflow">return</span> <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#a6efcef1ebce82b7e972f451c92574b78">parent::setView</a>($view);
- <a name="l00147"></a>00147 }
- <a name="l00148"></a>00148
- <a name="l00155"></a><a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#a14709784de42ac1565c64a09debb7db8">00155</a> <span class="keyword">public</span> function <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#a14709784de42ac1565c64a09debb7db8">getDecorators</a>()
- <a name="l00156"></a>00156 {
- <a name="l00157"></a>00157 $decorators = <a class="code" href="class_zend_x___j_query___form___element___ui_widget.html#a14709784de42ac1565c64a09debb7db8">parent::getDecorators</a>();
- <a name="l00158"></a>00158 <span class="keywordflow">if</span>(count($decorators) > 0) {
- <a name="l00159"></a>00159 <span class="comment">// Only check this if there are decorators present, otherwise it could</span>
- <a name="l00160"></a>00160 <span class="comment">// be that the decorators have not been initialized yet.</span>
- <a name="l00161"></a>00161 $foundUiWidgetElementMarker = <span class="keyword">false</span>;
- <a name="l00162"></a>00162 <span class="keywordflow">foreach</span>($decorators AS $decorator) {
- <a name="l00163"></a>00163 <span class="keywordflow">if</span>($decorator instanceof <a class="code" href="interface_zend_x___j_query___form___decorator___ui_widget_element_marker.html">ZendX_JQuery_Form_Decorator_UiWidgetElementMarker</a>) {
- <a name="l00164"></a>00164 $foundUiWidgetElementMarker = <span class="keyword">true</span>;
- <a name="l00165"></a>00165 }
- <a name="l00166"></a>00166 }
- <a name="l00167"></a>00167 <span class="keywordflow">if</span>($foundUiWidgetElementMarker === <span class="keyword">false</span>) {
- <a name="l00168"></a>00168 require_once <span class="stringliteral">"ZendX/JQuery/Form/Exception.php"</span>;
- <a name="l00169"></a>00169 <span class="keywordflow">throw</span> <span class="keyword">new</span> <a class="code" href="class_zend_x___j_query___form___exception.html">ZendX_JQuery_Form_Exception</a>(
- <a name="l00170"></a>00170 <span class="stringliteral">"Cannot render jQuery form element without at least one decorator "</span>.
- <a name="l00171"></a>00171 <span class="stringliteral">"implementing the 'ZendX_JQuery_Form_Decorator_UiWidgetElementMarker' interface. "</span>.
- <a name="l00172"></a>00172 <span class="stringliteral">"Default decorator for this marker interface is the 'ZendX_JQuery_Form_Decorator_UiWidgetElement'. "</span>.
- <a name="l00173"></a>00173 <span class="stringliteral">"Hint: The ViewHelper decorator does not render jQuery elements correctly."</span>
- <a name="l00174"></a>00174 );
- <a name="l00175"></a>00175 }
- <a name="l00176"></a>00176 }
- <a name="l00177"></a>00177
- <a name="l00178"></a>00178 <span class="keywordflow">return</span> $decorators;
- <a name="l00179"></a>00179 }
- <a name="l00180"></a>00180 }
- </pre></div></div>
- </div>
- <hr class="footer"/><address class="footer"><small>Generated on Thu Apr 19 2012 17:01:19 for openbiz by 
- <a href="http://www.doxygen.org/index.html">
- <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.2 </small></address>
- </body>
- </html>