Location: PHPKode > projects > PHP on Trax > johnpipi-trax-f599562/trax/doc/__filesource/fsource_PHPonTrax__vendortraxaction_viewhelpersactive_record_helper.php.html
<html>
<head>
<title>File Source for active_record_helper.php</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">PHPonTrax</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_PHPonTrax.html" class="menu">class tree: PHPonTrax</a> ]
		  [ <a href="../elementindex_PHPonTrax.html" class="menu">index: PHPonTrax</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_PHPonTrax.html">PHPonTrax</a><br />
              <a href="../li_PHPonTraxTest.html">PHPonTraxTest</a><br />
            <br /><br />
                  
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file active_record_helper.php</h1>
<p>Documentation is available at <a href="../PHPonTrax/_vendor_trax_action_view_helpers_active_record_helper_php.html">active_record_helper.php</a></p>
<div class="php">
<div class="listing"><pre><ol><li><a name="a1"></a><span class="src-php">&lt;?php</span></li>
<li><a name="a2"></a><span class="src-doc">/**</span></li>
<li><a name="a3"></a><span class="src-doc"> *  File containing ActiveRecordHelper class and support functions</span></li>
<li><a name="a4"></a><span class="src-doc"> *</span></li>
<li><a name="a5"></a><span class="src-doc"> *  (PHP 5)</span></li>
<li><a name="a6"></a><span class="src-doc"> *</span></li>
<li><a name="a7"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@package</span><span class="src-doc"> PHPonTrax</span></li>
<li><a name="a8"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id$</span></li>
<li><a name="a9"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> (c) 2005 John Peterson</span></li>
<li><a name="a10"></a><span class="src-doc"> *</span></li>
<li><a name="a11"></a><span class="src-doc"> *   Permission is hereby granted, free of charge, to any person obtaining</span></li>
<li><a name="a12"></a><span class="src-doc"> *   a copy of this software and associated documentation files (the</span></li>
<li><a name="a13"></a><span class="src-doc"> *   &quot;Software&quot;), to deal in the Software without restriction, including</span></li>
<li><a name="a14"></a><span class="src-doc"> *   without limitation the rights to use, copy, modify, merge, publish,</span></li>
<li><a name="a15"></a><span class="src-doc"> *   distribute, sublicense, and/or sell copies of the Software, and to</span></li>
<li><a name="a16"></a><span class="src-doc"> *   permit persons to whom the Software is furnished to do so, subject to</span></li>
<li><a name="a17"></a><span class="src-doc"> *   the following conditions:</span></li>
<li><a name="a18"></a><span class="src-doc"> *</span></li>
<li><a name="a19"></a><span class="src-doc"> *   The above copyright notice and this permission notice shall be</span></li>
<li><a name="a20"></a><span class="src-doc"> *   included in all copies or substantial portions of the Software.</span></li>
<li><a name="a21"></a><span class="src-doc"> *</span></li>
<li><a name="a22"></a><span class="src-doc"> *   THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,</span></li>
<li><a name="a23"></a><span class="src-doc"> *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span></li>
<li><a name="a24"></a><span class="src-doc"> *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span></li>
<li><a name="a25"></a><span class="src-doc"> *   NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE</span></li>
<li><a name="a26"></a><span class="src-doc"> *   LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION</span></li>
<li><a name="a27"></a><span class="src-doc"> *   OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION</span></li>
<li><a name="a28"></a><span class="src-doc"> *   WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span></li>
<li><a name="a29"></a><span class="src-doc"> *</span></li>
<li><a name="a30"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@package</span><span class="src-doc"> PHPonTrax</span></li>
<li><a name="a31"></a><span class="src-doc"> */</span></li>
<li><a name="a32"></a>&nbsp;</li>
<li><a name="a33"></a><span class="src-doc">/**</span></li>
<li><a name="a34"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this class</span></li>
<li><a name="a35"></a><span class="src-doc"> */</span></li>
<li><a name="a36"></a><span class="src-key">class </span><a href="../PHPonTrax/ActiveRecordHelper.html">ActiveRecordHelper</a> <span class="src-key">extends </span><a href="../PHPonTrax/Helpers.html">Helpers</a> <span class="src-sym">{</span></li>
<li><a name="a37"></a>    </li>
<li><a name="a38"></a>    <span class="src-doc">/**</span></li>
<li><a name="a39"></a><span class="src-doc">     *  Whether to generate scaffolding HTML</span></li>
<li><a name="a40"></a><span class="src-doc">     *</span></li>
<li><a name="a41"></a><span class="src-doc">     *  Set to true in </span><span class="src-doc-inlinetag">{@link form_scaffolding.phtml}</span><span class="src-doc">.  If true</span></li>
<li><a name="a42"></a><span class="src-doc">     *  generate HTML scaffold otherwise generate final HTML</span></li>
<li><a name="a43"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@var </span><span class="src-doc-type">boolean </span></li>
<li><a name="a44"></a><span class="src-doc">     */</span></li>
<li><a name="a45"></a>    <span class="src-key">public </span><a href="../PHPonTrax/ActiveRecordHelper.html#var$scaffolding">$scaffolding</a> = <span class="src-id">false</span><span class="src-sym">;</span></li>
<li><a name="a46"></a>&nbsp;</li>
<li><a name="a47"></a>    <span class="src-doc">/**</span></li>
<li><a name="a48"></a><span class="src-doc">     *  Returns a default input tag for the type of object returned by the method. Example</span></li>
<li><a name="a49"></a><span class="src-doc">     *  (title is a VARCHAR column and holds &quot;Hello World&quot;):</span></li>
<li><a name="a50"></a><span class="src-doc">     *   input(&quot;post&quot;, &quot;title&quot;) =&gt;</span></li>
<li><a name="a51"></a><span class="src-doc">     *     &lt;input id=&quot;post_title&quot; name=&quot;post[title]&quot; size=&quot;30&quot; type=&quot;text&quot; value=&quot;Hello World&quot; /&gt;</span></li>
<li><a name="a52"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> to_tag()</span></li>
<li><a name="a53"></a><span class="src-doc">     */</span></li>
<li><a name="a54"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodinput">input</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">, </span><span class="src-var">$attribute_name</span><span class="src-sym">, </span><span class="src-var">$options </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a55"></a>        <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_tag">to_tag</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">, </span><span class="src-var">$attribute_name</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;        </span></li>
<li><a name="a56"></a>    <span class="src-sym">}</span></li>
<li><a name="a57"></a>    </li>
<li><a name="a58"></a>    <span class="src-doc">/**</span></li>
<li><a name="a59"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a60"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> to_scaffold_tag()</span></li>
<li><a name="a61"></a><span class="src-doc">     */</span></li>
<li><a name="a62"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodinput_scaffolding">input_scaffolding</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">, </span><span class="src-var">$attribute_name</span><span class="src-sym">, </span><span class="src-var">$options </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a63"></a>        <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_scaffold_tag">to_scaffold_tag</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">, </span><span class="src-var">$attribute_name</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;        </span></li>
<li><a name="a64"></a>    <span class="src-sym">}</span></li>
<li><a name="a65"></a>&nbsp;</li>
<li><a name="a66"></a>    <span class="src-doc">/**</span></li>
<li><a name="a67"></a><span class="src-doc">     * Returns an entire form with input tags and everything for a specified Active Record object. Example</span></li>
<li><a name="a68"></a><span class="src-doc">     * (post is a new record that has a title using VARCHAR and a body using TEXT):</span></li>
<li><a name="a69"></a><span class="src-doc">     *   form(&quot;post&quot;) =&gt;</span></li>
<li><a name="a70"></a><span class="src-doc">     *     &lt;form action='/post/create' method='post'&gt;</span></li>
<li><a name="a71"></a><span class="src-doc">     *       &lt;p&gt;</span></li>
<li><a name="a72"></a><span class="src-doc">     *         &lt;label for=&quot;post_title&quot;&gt;Title&lt;/label&gt;&lt;br /&gt;</span></li>
<li><a name="a73"></a><span class="src-doc">     *         &lt;input id=&quot;post_title&quot; name=&quot;post[title]&quot; size=&quot;30&quot; type=&quot;text&quot; value=&quot;Hello World&quot; /&gt;</span></li>
<li><a name="a74"></a><span class="src-doc">     *       &lt;/p&gt;</span></li>
<li><a name="a75"></a><span class="src-doc">     *       &lt;p&gt;</span></li>
<li><a name="a76"></a><span class="src-doc">     *         &lt;label for=&quot;post_body&quot;&gt;Body&lt;/label&gt;&lt;br /&gt;</span></li>
<li><a name="a77"></a><span class="src-doc">     *         &lt;textarea cols=&quot;40&quot; id=&quot;post_body&quot; name=&quot;post[body]&quot; rows=&quot;20&quot;&gt;</span></li>
<li><a name="a78"></a><span class="src-doc">     *           Back to the hill and over it again!</span></li>
<li><a name="a79"></a><span class="src-doc">     *         &lt;/textarea&gt;</span></li>
<li><a name="a80"></a><span class="src-doc">     *       &lt;/p&gt;</span></li>
<li><a name="a81"></a><span class="src-doc">     *       &lt;input type='submit' value='Create' /&gt;</span></li>
<li><a name="a82"></a><span class="src-doc">     *     &lt;/form&gt;</span></li>
<li><a name="a83"></a><span class="src-doc">     *</span></li>
<li><a name="a84"></a><span class="src-doc">     *  It's possible to specialize the form builder by using a different action name and by supplying another</span></li>
<li><a name="a85"></a><span class="src-doc">     *  block renderer. Example (entry is a new record that has a message attribute using VARCHAR):</span></li>
<li><a name="a86"></a><span class="src-doc">     *</span></li>
<li><a name="a87"></a><span class="src-doc">     *   form(&quot;entry&quot;, array('action' =&gt; &quot;sign&quot;, 'input_block' =&gt;</span></li>
<li><a name="a88"></a><span class="src-doc">     *        'foreach($record-&gt;content_columns() as $column_name =&gt; $column) $contents .= Inflector::humanize($column_name) . &quot;: &quot; . input($record, $column) . &quot;&lt;br /&gt;&quot;')) =&gt;</span></li>
<li><a name="a89"></a><span class="src-doc">     *</span></li>
<li><a name="a90"></a><span class="src-doc">     *     &lt;form action='/post/sign' method='post'&gt;</span></li>
<li><a name="a91"></a><span class="src-doc">     *       Message:</span></li>
<li><a name="a92"></a><span class="src-doc">     *       &lt;input id=&quot;post_title&quot; name=&quot;post[title]&quot; size=&quot;30&quot; type=&quot;text&quot; value=&quot;Hello World&quot; /&gt;&lt;br /&gt;</span></li>
<li><a name="a93"></a><span class="src-doc">     *       &lt;input type='submit' value='Sign' /&gt;</span></li>
<li><a name="a94"></a><span class="src-doc">     *     &lt;/form&gt;</span></li>
<li><a name="a95"></a><span class="src-doc">     *</span></li>
<li><a name="a96"></a><span class="src-doc">     *  It's also possible to add additional content to the form by giving it a block, such as:</span></li>
<li><a name="a97"></a><span class="src-doc">     *</span></li>
<li><a name="a98"></a><span class="src-doc">     *   form(&quot;entry&quot;, array('action' =&gt; &quot;sign&quot;, 'block' =&gt;</span></li>
<li><a name="a99"></a><span class="src-doc">     *     content_tag(&quot;b&quot;, &quot;Department&quot;) .</span></li>
<li><a name="a100"></a><span class="src-doc">     *     collection_select(&quot;department&quot;, &quot;id&quot;, $departments, &quot;id&quot;, &quot;name&quot;))</span></li>
<li><a name="a101"></a><span class="src-doc">     *   )</span></li>
<li><a name="a102"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> all_input_tags()</span></li>
<li><a name="a103"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> content_tag()</span></li>
<li><a name="a104"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> Helpers::object()</span></li>
<li><a name="a105"></a><span class="src-doc">     */</span></li>
<li><a name="a106"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodform">form</a><span class="src-sym">(</span><span class="src-var">$record_name</span><span class="src-sym">, </span><span class="src-var">$options </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a107"></a>        <span class="src-var">$record </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-var">$record_name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a108"></a>        <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">&quot;action&quot;</span><span class="src-sym">] </span>= <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">&quot;:action&quot;</span><span class="src-sym">] </span>? <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">&quot;:action&quot;</span><span class="src-sym">] </span>: <span class="src-var">$record</span><span class="src-sym">-&gt;</span><span class="src-id">is_new_record</span><span class="src-sym">(</span><span class="src-sym">) </span>? <span class="src-str">&quot;add&quot; </span>: <span class="src-str">&quot;save&quot;</span><span class="src-sym">;</span></li>
<li><a name="a109"></a>        <span class="src-var">$action </span>= <a href="../PHPonTrax/_vendor_trax_action_view_helpers_url_helper_php.html#functionurl_for">url_for</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">':action' </span>=&gt; <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">':action'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-str">':id' </span>=&gt; <span class="src-var">$record</span><span class="src-sym">-&gt;</span><span class="src-id">id</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a110"></a>        <span class="src-var">$submit_value </span>= <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'submit_value'</span><span class="src-sym">]</span><span class="src-sym">) </span>? <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'submit_value'</span><span class="src-sym">] </span>: <a href="http://www.php.net/ucfirst">ucfirst</a><span class="src-sym">(</span><a href="http://www.php.net/preg_replace">preg_replace</a><span class="src-sym">(</span><span class="src-str">'/[^\w]/'</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">':action'</span><span class="src-sym">]</span><span class="src-sym">)))</span><span class="src-sym">;</span></li>
<li><a name="a111"></a>&nbsp;</li>
<li><a name="a112"></a>        <span class="src-var">$contents </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a113"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$record</span><span class="src-sym">-&gt;</span><span class="src-id">is_new_record</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-var">$contents </span>.= <a href="../PHPonTrax/_vendor_trax_action_view_helpers_form_helper_php.html#functionhidden_field">hidden_field</a><span class="src-sym">(</span><span class="src-var">$record_name</span><span class="src-sym">, </span><span class="src-str">'id'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a114"></a>        <span class="src-var">$contents </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodall_input_tags">all_input_tags</a><span class="src-sym">(</span><span class="src-var">$record</span><span class="src-sym">, </span><span class="src-var">$record_name</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a115"></a>        <span class="src-key">if</span><span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'block'</span><span class="src-sym">]</span><span class="src-sym">)) </span><span class="src-var">$contents </span>.= eval<span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'block'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a116"></a>        <span class="src-var">$contents </span>.= <span class="src-str">&quot;&lt;br&gt;&quot;</span>.<a href="../PHPonTrax/_vendor_trax_action_view_helpers_form_tag_helper_php.html#functionsubmit_tag">submit_tag</a><span class="src-sym">(</span><span class="src-var">$submit_value</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;br&gt;&lt;br&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a117"></a>&nbsp;</li>
<li><a name="a118"></a>        <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcontent_tag">content_tag</a><span class="src-sym">(</span><span class="src-str">'form'</span><span class="src-sym">, </span><span class="src-var">$contents</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'action' </span>=&gt; <span class="src-var">$action</span><span class="src-sym">, </span><span class="src-str">'method' </span>=&gt; <span class="src-str">'post'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a119"></a>    <span class="src-sym">}</span></li>
<li><a name="a120"></a>&nbsp;</li>
<li><a name="a121"></a>    <span class="src-doc">/**</span></li>
<li><a name="a122"></a><span class="src-doc">     *  Returns a string containing the error message attached to the +method+ on the +object+, if one exists.</span></li>
<li><a name="a123"></a><span class="src-doc">     *  This error message is wrapped in a DIV tag, which can be specialized to include both a +prepend_text+ and +append_text+</span></li>
<li><a name="a124"></a><span class="src-doc">     *  to properly introduce the error and a +css_class+ to style it accordingly. Examples (post has an error message</span></li>
<li><a name="a125"></a><span class="src-doc">     *  &quot;can't be empty&quot; on the title attribute):</span></li>
<li><a name="a126"></a><span class="src-doc">     *</span></li>
<li><a name="a127"></a><span class="src-doc">     *   &lt;?= error_message_on(&quot;post&quot;, &quot;title&quot;) ?&gt; =&gt;</span></li>
<li><a name="a128"></a><span class="src-doc">     *     &lt;div class=&quot;formError&quot;&gt;can't be empty&lt;/div&gt;</span></li>
<li><a name="a129"></a><span class="src-doc">     *</span></li>
<li><a name="a130"></a><span class="src-doc">     *   &lt;?= error_message_on &quot;post&quot;, &quot;title&quot;, &quot;Title simply &quot;, &quot; (or it won't work)&quot;, &quot;inputError&quot; ?&gt; =&gt;</span></li>
<li><a name="a131"></a><span class="src-doc">     *     &lt;div class=&quot;inputError&quot;&gt;Title simply can't be empty (or it won't work)&lt;/div&gt;</span></li>
<li><a name="a132"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> attribute_name</span></li>
<li><a name="a133"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> controller_object</span></li>
<li><a name="a134"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> content_tag()</span></li>
<li><a name="a135"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object_name</span></li>
<li><a name="a136"></a><span class="src-doc">     */</span></li>
<li><a name="a137"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_message_on">error_message_on</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">, </span><span class="src-var">$attribute_name</span><span class="src-sym">, </span><span class="src-var">$prepend_text </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$append_text </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">, </span><span class="src-var">$css_class </span>= <span class="src-str">&quot;formError&quot;</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a138"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$object_name">object_name</a> = <span class="src-var">$object_name</span><span class="src-sym">;</span></li>
<li><a name="a139"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a> = <span class="src-var">$attribute_name</span><span class="src-sym">;</span></li>
<li><a name="a140"></a>        <span class="src-var">$object </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$controller_object">controller_object</a><span class="src-sym">-&gt;</span><span class="src-var">$object_name</span><span class="src-sym">;</span></li>
<li><a name="a141"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$errors </span>= <span class="src-var">$object</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">[</span><span class="src-var">$attribute_name</span><span class="src-sym">]</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a142"></a>            <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcontent_tag">content_tag</a><span class="src-sym">(</span><span class="src-str">&quot;div&quot;</span><span class="src-sym">, </span><span class="src-var">$prepend_text </span>. <span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$errors</span><span class="src-sym">) </span>? <a href="http://www.php.net/current">current</a><span class="src-sym">(</span><span class="src-var">$errors</span><span class="src-sym">) </span>: <span class="src-var">$errors</span><span class="src-sym">) </span>. <span class="src-var">$append_text</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'class' </span>=&gt; <span class="src-var">$css_class</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a143"></a>        <span class="src-sym">}</span></li>
<li><a name="a144"></a>    <span class="src-sym">}</span></li>
<li><a name="a145"></a>&nbsp;</li>
<li><a name="a146"></a>    <span class="src-doc">/**</span></li>
<li><a name="a147"></a><span class="src-doc">     *  Returns a string with a div containing all the error messages for the object located as an instance variable by the name</span></li>
<li><a name="a148"></a><span class="src-doc">     *  of &lt;tt&gt;object_name&lt;/tt&gt;. This div can be tailored by the following options:</span></li>
<li><a name="a149"></a><span class="src-doc">     *</span></li>
<li><a name="a150"></a><span class="src-doc">     * &lt;tt&gt;header_tag&lt;/tt&gt; - Used for the header of the error div (default: h2)</span></li>
<li><a name="a151"></a><span class="src-doc">     * &lt;tt&gt;id&lt;/tt&gt; - The id of the error div (default: errorExplanation)</span></li>
<li><a name="a152"></a><span class="src-doc">     * &lt;tt&gt;class&lt;/tt&gt; - The class of the error div (default: errorExplanation)</span></li>
<li><a name="a153"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">mixed </span><span class="src-doc">object_name  The name of a PHP class, or</span></li>
<li><a name="a154"></a><span class="src-doc">     *                             an object instance of that class</span></li>
<li><a name="a155"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string[] </span><span class="src-doc">options Set of options: 'header_tag', 'id', 'class'</span></li>
<li><a name="a156"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> content_tag()</span></li>
<li><a name="a157"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object_name</span></li>
<li><a name="a158"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> Inflector::humanize()</span></li>
<li><a name="a159"></a><span class="src-doc">     */</span></li>
<li><a name="a160"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_messages_for">error_messages_for</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">, </span><span class="src-var">$options </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a161"></a>        <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_object">is_object</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a162"></a>            <span class="src-var">$object_name </span>= <a href="http://www.php.net/get_class">get_class</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a163"></a>            <span class="src-comm">//echo &quot;object name:&quot;.$object_name;</span></li>
<li><a name="a164"></a>        <span class="src-sym">}</span></li>
<li><a name="a165"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$object_name">object_name</a> = <span class="src-var">$object_name</span><span class="src-sym">;</span></li>
<li><a name="a166"></a>        <span class="src-var">$object </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$controller_object">controller_object</a><span class="src-sym">-&gt;</span><span class="src-var">$object_name</span><span class="src-sym">;</span></li>
<li><a name="a167"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a168"></a>            <span class="src-var">$errors </span>= <span class="src-sym">(</span><span class="src-var">$num_errors </span>= <a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">)) </span>&gt; <span class="src-num">1 </span>? <span class="src-str">&quot;</span><span class="src-str"><span class="src-var">$num_errors</span> <span class="src-id">errors</span></span><span class="src-str">&quot; </span>: <span class="src-str">&quot;</span><span class="src-str"><span class="src-var">$num_errors</span> <span class="src-id">error</span></span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a169"></a>            <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcontent_tag">content_tag</a><span class="src-sym">(</span><span class="src-str">&quot;div&quot;</span><span class="src-sym">,</span></li>
<li><a name="a170"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcontent_tag">content_tag</a><span class="src-sym">(</span></li>
<li><a name="a171"></a>                    <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'header_tag'</span><span class="src-sym">]</span><span class="src-sym">) </span>? <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'header_tag'</span><span class="src-sym">] </span>: <span class="src-str">&quot;h2&quot;</span><span class="src-sym">)</span><span class="src-sym">,</span></li>
<li><a name="a172"></a>                    <span class="src-var">$errors </span>. </li>
<li><a name="a173"></a>                    <span class="src-str">&quot; prohibited this &quot; </span>. <span class="src-id"><a href="../PHPonTrax/Inflector.html">Inflector</a></span><span class="src-sym">::</span><a href="../PHPonTrax/Inflector.html#methodhumanize">humanize</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">) </span>. <span class="src-str">&quot; from being saved&quot;</span></li>
<li><a name="a174"></a>                <span class="src-sym">) </span>.</li>
<li><a name="a175"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcontent_tag">content_tag</a><span class="src-sym">(</span><span class="src-str">&quot;p&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;There were problems with the following fields:&quot;</span><span class="src-sym">) </span>.</li>
<li><a name="a176"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcontent_tag">content_tag</a><span class="src-sym">(</span><span class="src-str">&quot;ul&quot;</span><span class="src-sym">, </span><a href="http://www.php.net/array_reduce">array_reduce</a><span class="src-sym">(</span><span class="src-var">$object</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">, </span><a href="http://www.php.net/create_function">create_function</a><span class="src-sym">(</span><span class="src-str">'$v,$w'</span><span class="src-sym">, </span><span class="src-str">'return ($v ? $v : &quot;&quot;) . content_tag(&quot;li&quot;, $w);'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-str">''</span><span class="src-sym">))</span><span class="src-sym">,</span></li>
<li><a name="a177"></a>                <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;id&quot; </span>=&gt; <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'id'</span><span class="src-sym">]</span><span class="src-sym">) </span>? <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'id'</span><span class="src-sym">] </span>: <span class="src-str">&quot;ErrorExplanation&quot;</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-str">&quot;class&quot; </span>=&gt; <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'class'</span><span class="src-sym">]</span><span class="src-sym">) </span>? <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'class'</span><span class="src-sym">] </span>: <span class="src-str">&quot;ErrorExplanation&quot;</span><span class="src-sym">))</span></li>
<li><a name="a178"></a>            <span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a179"></a>        <span class="src-sym">}</span></li>
<li><a name="a180"></a>    <span class="src-sym">}</span></li>
<li><a name="a181"></a>&nbsp;</li>
<li><a name="a182"></a>    <span class="src-doc">/**</span></li>
<li><a name="a183"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a184"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> default_input_block()</span></li>
<li><a name="a185"></a><span class="src-doc">     */</span></li>
<li><a name="a186"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodall_input_tags">all_input_tags</a><span class="src-sym">(</span><span class="src-var">$record</span><span class="src-sym">, </span><span class="src-var">$record_name</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a187"></a>        <span class="src-comm">//if($record_name) $this-&gt;object_name = $record_name;</span></li>
<li><a name="a188"></a>        <span class="src-var">$input_block </span>= <span class="src-sym">(</span>isset<span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'input_block'</span><span class="src-sym">]</span><span class="src-sym">) </span>? <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'input_block'</span><span class="src-sym">] </span>: <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methoddefault_input_block">default_input_block</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a189"></a>        <span class="src-var">$contents </span>= <span class="src-str">''</span><span class="src-sym">;</span></li>
<li><a name="a190"></a>        <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/is_array">is_array</a><span class="src-sym">(</span><span class="src-var">$record</span><span class="src-sym">-&gt;</span><span class="src-id">content_columns</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a191"></a>            <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$record</span><span class="src-sym">-&gt;</span><span class="src-id">content_columns </span><span class="src-key">as </span><span class="src-var">$column</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a192"></a>                <span class="src-comm">//$contents .= &quot;&lt;p&gt;&lt;label for=\&quot;&quot;.$record_name.&quot;_&quot;.$column['name'].&quot;\&quot;&gt;&quot;;</span></li>
<li><a name="a193"></a>                <span class="src-comm">//$contents .= Inflector::humanize($column['name']) . &quot;:&lt;/label&gt;&lt;br /&gt;&quot;;</span></li>
<li><a name="a194"></a>                <span class="src-comm">//$contents .= input($record_name, $column['name']) . &quot;&lt;/p&gt;\n&quot;;</span></li>
<li><a name="a195"></a>                <span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/in_array">in_array</a><span class="src-sym">(</span><span class="src-var">$column</span><span class="src-sym">[</span><span class="src-str">'name'</span><span class="src-sym">]</span><span class="src-sym">, </span><span class="src-var">$record</span><span class="src-sym">-&gt;</span><span class="src-id">primary_keys</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a196"></a>                    eval<span class="src-sym">(</span><span class="src-var">$input_block</span><span class="src-sym">) </span>. <span class="src-str">&quot;\n&quot;</span><span class="src-sym">;    </span></li>
<li><a name="a197"></a>                <span class="src-sym">}         </span></li>
<li><a name="a198"></a>            <span class="src-sym">}</span></li>
<li><a name="a199"></a>        <span class="src-sym">} </span></li>
<li><a name="a200"></a>        <span class="src-key">return </span><span class="src-var">$contents</span><span class="src-sym">;</span></li>
<li><a name="a201"></a>    <span class="src-sym">}</span></li>
<li><a name="a202"></a>&nbsp;</li>
<li><a name="a203"></a>    <span class="src-doc">/**</span></li>
<li><a name="a204"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a205"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> scaffolding</span></li>
<li><a name="a206"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> input_scaffolding()</span></li>
<li><a name="a207"></a><span class="src-doc">     */</span></li>
<li><a name="a208"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methoddefault_input_block">default_input_block</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a209"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#var$scaffolding">scaffolding</a><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a210"></a>            <span class="src-key">return </span><span class="src-str">'$contents .= &quot;&lt;p&gt;&lt;label for=\&quot;{$record_name}_{$column[\'name\']}\&quot;&gt;&quot; . Inflector::humanize($column[\'name\']) . &quot;:&lt;/label&gt;&lt;br/&gt;\n&lt;?= &quot; . input_scaffolding($record_name, $column[\'name\']) . &quot; ?&gt;&lt;/p&gt;\n&quot;;'</span><span class="src-sym">;</span></li>
<li><a name="a211"></a>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a212"></a>            <span class="src-key">return </span><span class="src-str">'$contents .= &quot;&lt;p&gt;&lt;label for=\&quot;{$record_name}_{$column[\'name\']}\&quot;&gt;&quot; . Inflector::humanize($column[\'name\']) . &quot;:&lt;/label&gt;&lt;br/&gt;\n&quot; . input($record_name, $column[\'name\']) . &quot;&lt;/p&gt;\n&quot;;'</span><span class="src-sym">;</span></li>
<li><a name="a213"></a>        <span class="src-sym">}</span></li>
<li><a name="a214"></a>    <span class="src-sym">}</span></li>
<li><a name="a215"></a>    </li>
<li><a name="a216"></a>    <span class="src-doc">/**</span></li>
<li><a name="a217"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a218"></a><span class="src-doc">     *</span></li>
<li><a name="a219"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">object_name    Name of an ActiveRecord subclass</span></li>
<li><a name="a220"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc">attribute_name Name of an attribute of $object_name</span></li>
<li><a name="a221"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string[] </span><span class="src-doc">options</span></li>
<li><a name="a222"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> attribute_name</span></li>
<li><a name="a223"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> column_type()</span></li>
<li><a name="a224"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> error_wrapping()</span></li>
<li><a name="a225"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object_name</span></li>
<li><a name="a226"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> DateHelper::to_date_select_tag()</span></li>
<li><a name="a227"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> FormHelper::to_boolean_select_tag()</span></li>
<li><a name="a228"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> FormHelper::to_input_field_tag()</span></li>
<li><a name="a229"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> FormHelper::to_text_area_tag()</span></li>
<li><a name="a230"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> to_datetime_select_tag()</span></li>
<li><a name="a231"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object()</span></li>
<li><a name="a232"></a><span class="src-doc">     */</span></li>
<li><a name="a233"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_tag">to_tag</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">, </span><span class="src-var">$attribute_name</span><span class="src-sym">, </span><span class="src-var">$options </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a234"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$object_name">object_name</a> = <span class="src-var">$object_name</span><span class="src-sym">;</span></li>
<li><a name="a235"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a> = <span class="src-var">$attribute_name</span><span class="src-sym">;</span></li>
<li><a name="a236"></a>        <span class="src-var">$form </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/FormHelper.html">FormHelper</a></span><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">, </span><span class="src-var">$attribute_name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a237"></a>        <span class="src-key">switch</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcolumn_type">column_type</a><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a238"></a>        <span class="src-key">case </span><span class="src-str">'string'</span>:</li>
<li><a name="a239"></a>        <span class="src-key">case </span><span class="src-str">'varchar'</span>:</li>
<li><a name="a240"></a>        <span class="src-key">case </span><span class="src-str">'varchar2'</span>:</li>
<li><a name="a241"></a>            <span class="src-var">$field_type </span>= <span class="src-sym">(</span><a href="http://www.php.net/eregi">eregi</a><span class="src-sym">(</span><span class="src-str">&quot;password&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">) </span>? <span class="src-str">&quot;password&quot; </span>: <span class="src-str">&quot;text&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a242"></a>            <span class="src-var">$results </span>= <span class="src-var">$form</span><span class="src-sym">-&gt;</span><span class="src-id">to_input_field_tag</span><span class="src-sym">(</span><span class="src-var">$field_type</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a243"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a244"></a>&nbsp;</li>
<li><a name="a245"></a>        <span class="src-key">case </span><span class="src-str">'text'</span>:</li>
<li><a name="a246"></a>        <span class="src-key">case </span><span class="src-str">'blob'</span>:</li>
<li><a name="a247"></a>            <span class="src-var">$results </span>= <span class="src-var">$form</span><span class="src-sym">-&gt;</span><span class="src-id">to_text_area_tag</span><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a248"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a249"></a>&nbsp;</li>
<li><a name="a250"></a>        <span class="src-key">case </span><span class="src-str">'integer'</span>:</li>
<li><a name="a251"></a>        <span class="src-key">case </span><span class="src-str">'int'</span>:</li>
<li><a name="a252"></a>        <span class="src-key">case </span><span class="src-str">'number'</span>:</li>
<li><a name="a253"></a>        <span class="src-key">case </span><span class="src-str">'float'</span>:</li>
<li><a name="a254"></a>        <span class="src-key">case </span><span class="src-str">'real'</span>:</li>
<li><a name="a255"></a>            <span class="src-var">$results </span>= <span class="src-var">$form</span><span class="src-sym">-&gt;</span><span class="src-id">to_input_field_tag</span><span class="src-sym">(</span><span class="src-str">&quot;text&quot;</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a256"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a257"></a>&nbsp;</li>
<li><a name="a258"></a>        <span class="src-key">case </span><span class="src-str">'date'</span>:</li>
<li><a name="a259"></a>            <span class="src-var">$form </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/DateHelper.html">DateHelper</a></span><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">, </span><span class="src-var">$attribute_name</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a260"></a>            <span class="src-var">$results </span>= <span class="src-var">$form</span><span class="src-sym">-&gt;</span><span class="src-id">to_date_select_tag</span><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a261"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a262"></a>&nbsp;</li>
<li><a name="a263"></a>        <span class="src-key">case </span><span class="src-str">'datetime'</span>:</li>
<li><a name="a264"></a>        <span class="src-key">case </span><span class="src-str">'timestamp'</span>:</li>
<li><a name="a265"></a>            <span class="src-var">$results </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_datetime_select_tag">to_datetime_select_tag</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a266"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a267"></a>&nbsp;</li>
<li><a name="a268"></a>        <span class="src-key">case </span><span class="src-str">'boolean'</span>:</li>
<li><a name="a269"></a>        <span class="src-key">case </span><span class="src-str">'bool'</span>:</li>
<li><a name="a270"></a>            <span class="src-var">$results </span>= <span class="src-var">$form</span><span class="src-sym">-&gt;</span><span class="src-id">to_boolean_select_tag</span><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a271"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a272"></a>&nbsp;</li>
<li><a name="a273"></a>        <span class="src-sym">}</span></li>
<li><a name="a274"></a>        <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a275"></a>            <span class="src-var">$results </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_wrapping">error_wrapping</a><span class="src-sym">(</span><span class="src-var">$results</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a276"></a>        <span class="src-sym">}</span></li>
<li><a name="a277"></a>        <span class="src-key">return </span><span class="src-var">$results</span><span class="src-sym">;      </span></li>
<li><a name="a278"></a>    <span class="src-sym">}</span></li>
<li><a name="a279"></a>&nbsp;</li>
<li><a name="a280"></a>    <span class="src-doc">/**</span></li>
<li><a name="a281"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a282"></a><span class="src-doc">     *</span></li>
<li><a name="a283"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> attribute_name</span></li>
<li><a name="a284"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> column_type()</span></li>
<li><a name="a285"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> error_wrapping</span></li>
<li><a name="a286"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object()</span></li>
<li><a name="a287"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object_name</span></li>
<li><a name="a288"></a><span class="src-doc">     */</span></li>
<li><a name="a289"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_scaffold_tag">to_scaffold_tag</a><span class="src-sym">(</span><span class="src-var">$object_name</span><span class="src-sym">, </span><span class="src-var">$attribute_name</span><span class="src-sym">, </span><span class="src-var">$options </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a290"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$object_name">object_name</a> = <span class="src-var">$object_name</span><span class="src-sym">;</span></li>
<li><a name="a291"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a> = <span class="src-var">$attribute_name</span><span class="src-sym">;</span></li>
<li><a name="a292"></a>        <span class="src-key">switch</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcolumn_type">column_type</a><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a293"></a>        <span class="src-key">case </span><span class="src-str">'string'</span>:</li>
<li><a name="a294"></a>        <span class="src-key">case </span><span class="src-str">'varchar'</span>:</li>
<li><a name="a295"></a>        <span class="src-key">case </span><span class="src-str">'varchar2'</span>:</li>
<li><a name="a296"></a>            <span class="src-var">$field_type </span>= <span class="src-sym">(</span><a href="http://www.php.net/eregi">eregi</a><span class="src-sym">(</span><span class="src-str">&quot;password&quot;</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">) </span>? <span class="src-str">&quot;password&quot; </span>: <span class="src-str">&quot;text&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a297"></a>            <span class="src-var">$results </span>= <span class="src-var">$field_type</span>.<span class="src-str">&quot;</span><span class="src-str"><span class="src-id">_field</span>(\&quot;<span class="src-var">$object_name</span>\&quot;, \&quot;<span class="src-var">$attribute_name</span>\&quot;)</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a298"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a299"></a>&nbsp;</li>
<li><a name="a300"></a>        <span class="src-key">case </span><span class="src-str">'text'</span>:</li>
<li><a name="a301"></a>        <span class="src-key">case </span><span class="src-str">'blob'</span>:</li>
<li><a name="a302"></a>            <span class="src-var">$results </span>= <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">text_area</span>(\&quot;<span class="src-var">$object_name</span>\&quot;, \&quot;<span class="src-var">$attribute_name</span>\&quot;)</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a303"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a304"></a>&nbsp;</li>
<li><a name="a305"></a>        <span class="src-key">case </span><span class="src-str">'integer'</span>:</li>
<li><a name="a306"></a>        <span class="src-key">case </span><span class="src-str">'int'</span>:</li>
<li><a name="a307"></a>        <span class="src-key">case </span><span class="src-str">'number'</span>:</li>
<li><a name="a308"></a>        <span class="src-key">case </span><span class="src-str">'float'</span>:</li>
<li><a name="a309"></a>        <span class="src-key">case </span><span class="src-str">'real'</span>:</li>
<li><a name="a310"></a>            <span class="src-var">$results </span>= <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">text_field</span>(\&quot;<span class="src-var">$object_name</span>\&quot;, \&quot;<span class="src-var">$attribute_name</span>\&quot;)</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a311"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a312"></a>&nbsp;</li>
<li><a name="a313"></a>        <span class="src-key">case </span><span class="src-str">'date'</span>:</li>
<li><a name="a314"></a>            <span class="src-var">$results </span>= <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">date_select</span>(\&quot;<span class="src-var">$object_name</span>\&quot;, \&quot;<span class="src-var">$attribute_name</span>\&quot;)</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a315"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a316"></a>&nbsp;</li>
<li><a name="a317"></a>        <span class="src-key">case </span><span class="src-str">'year'</span>:</li>
<li><a name="a318"></a>            <span class="src-var">$results </span>= <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">year_select</span>(\&quot;<span class="src-var">$object_name</span>\&quot;, \&quot;<span class="src-var">$attribute_name</span>\&quot;)</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a319"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a320"></a>&nbsp;</li>
<li><a name="a321"></a>        <span class="src-key">case </span><span class="src-str">'datetime'</span>:</li>
<li><a name="a322"></a>        <span class="src-key">case </span><span class="src-str">'timestamp'</span>:</li>
<li><a name="a323"></a>            <span class="src-var">$results </span>= <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">datetime_select</span>(\&quot;<span class="src-var">$object_name</span>\&quot;, \&quot;<span class="src-var">$attribute_name</span>\&quot;)</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a324"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a325"></a>&nbsp;</li>
<li><a name="a326"></a>        <span class="src-key">case </span><span class="src-str">'time'</span>:</li>
<li><a name="a327"></a>            <span class="src-var">$results </span>= <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">time_select</span>(\&quot;<span class="src-var">$object_name</span>\&quot;, \&quot;<span class="src-var">$attribute_name</span>\&quot;)</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a328"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a329"></a>&nbsp;</li>
<li><a name="a330"></a>        <span class="src-key">case </span><span class="src-str">'boolean'</span>:</li>
<li><a name="a331"></a>        <span class="src-key">case </span><span class="src-str">'bool'</span>:</li>
<li><a name="a332"></a>            <span class="src-var">$results </span>= <span class="src-str">&quot;</span><span class="src-str"><span class="src-id">boolean_select</span>(\&quot;<span class="src-var">$object_name</span>\&quot;, \&quot;<span class="src-var">$attribute_name</span>\&quot;)</span><span class="src-str">&quot;</span><span class="src-sym">;</span></li>
<li><a name="a333"></a>            <span class="src-key">break</span><span class="src-sym">;</span></li>
<li><a name="a334"></a>&nbsp;</li>
<li><a name="a335"></a>        <span class="src-key">default</span>:</li>
<li><a name="a336"></a>            echo <span class="src-str">&quot;No case statement for &quot;</span>.<span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcolumn_type">column_type</a><span class="src-sym">(</span><span class="src-sym">)</span>.<span class="src-str">&quot;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a337"></a>        <span class="src-sym">}</span></li>
<li><a name="a338"></a>        <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a339"></a>            <span class="src-var">$results </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_wrapping">error_wrapping</a><span class="src-sym">(</span><span class="src-var">$results</span><span class="src-sym">, </span></li>
<li><a name="a340"></a>                              <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a341"></a>        <span class="src-sym">}</span></li>
<li><a name="a342"></a>        <span class="src-key">return </span><span class="src-var">$results</span><span class="src-sym">;</span></li>
<li><a name="a343"></a>    <span class="src-sym">}</span></li>
<li><a name="a344"></a>&nbsp;</li>
<li><a name="a345"></a>    <span class="src-doc">/**</span></li>
<li><a name="a346"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a347"></a><span class="src-doc">     *</span></li>
<li><a name="a348"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> tag()</span></li>
<li><a name="a349"></a><span class="src-doc">     */</span></li>
<li><a name="a350"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodtag_without_error_wrapping">tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a351"></a>        <span class="src-var">$args </span>= <a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a352"></a>        <span class="src-key">return </span><a href="http://www.php.net/call_user_func_array">call_user_func_array</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-id">parent</span><span class="src-sym">, </span><span class="src-str">'tag'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$args</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a353"></a>    <span class="src-sym">}</span></li>
<li><a name="a354"></a>&nbsp;</li>
<li><a name="a355"></a>    <span class="src-doc">/**</span></li>
<li><a name="a356"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a357"></a><span class="src-doc">     *</span></li>
<li><a name="a358"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> error_wrapping()</span></li>
<li><a name="a359"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object()</span></li>
<li><a name="a360"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> tag_without_error_wrapping()</span></li>
<li><a name="a361"></a><span class="src-doc">     */</span></li>
<li><a name="a362"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodtag">tag</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$options </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a363"></a>        <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a364"></a>            <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_wrapping">error_wrapping</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodtag_without_error_wrapping">tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a365"></a>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a366"></a>            <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodtag_without_error_wrapping">tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a367"></a>        <span class="src-sym">}</span></li>
<li><a name="a368"></a>    <span class="src-sym">}</span></li>
<li><a name="a369"></a>&nbsp;</li>
<li><a name="a370"></a>    <span class="src-doc">/**</span></li>
<li><a name="a371"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a372"></a><span class="src-doc">     *</span></li>
<li><a name="a373"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> content_tag()</span></li>
<li><a name="a374"></a><span class="src-doc">     */</span></li>
<li><a name="a375"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcontent_tag_without_error_wrapping">content_tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a376"></a>        <span class="src-var">$args </span>= <a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a377"></a>        <span class="src-key">return </span><a href="http://www.php.net/call_user_func_array">call_user_func_array</a><span class="src-sym">(</span><span class="src-str">'content_tag'</span><span class="src-sym">, </span><span class="src-var">$args</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a378"></a>    <span class="src-sym">}</span></li>
<li><a name="a379"></a>&nbsp;</li>
<li><a name="a380"></a>    <span class="src-doc">/**</span></li>
<li><a name="a381"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a382"></a><span class="src-doc">     *</span></li>
<li><a name="a383"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object()</span></li>
<li><a name="a384"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> error_wrapping()</span></li>
<li><a name="a385"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> content_tag_without_error_wrapping()</span></li>
<li><a name="a386"></a><span class="src-doc">     */</span></li>
<li><a name="a387"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcontent_tag">content_tag</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">, </span><span class="src-var">$options </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a388"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a389"></a>            <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_wrapping">error_wrapping</a><span class="src-sym">(</span></li>
<li><a name="a390"></a>          <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcontent_tag_without_error_wrapping">content_tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">,</span></li>
<li><a name="a391"></a>            <a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">,</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">)</span></li>
<li><a name="a392"></a>            ? <span class="src-id">true </span>: <span class="src-id">false</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a393"></a>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a394"></a>            <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcontent_tag_without_error_wrapping">content_tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-var">$name</span><span class="src-sym">, </span><span class="src-var">$value</span><span class="src-sym">,</span></li>
<li><a name="a395"></a>                                                             <span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a396"></a>        <span class="src-sym">}</span></li>
<li><a name="a397"></a>    <span class="src-sym">}</span></li>
<li><a name="a398"></a>&nbsp;</li>
<li><a name="a399"></a>    <span class="src-doc">/**</span></li>
<li><a name="a400"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a401"></a><span class="src-doc">     *</span></li>
<li><a name="a402"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object_name</span></li>
<li><a name="a403"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> attribute_name</span></li>
<li><a name="a404"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> DateHelper::to_date_select_tag()</span></li>
<li><a name="a405"></a><span class="src-doc">     */</span></li>
<li><a name="a406"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_date_select_tag_without_error_wrapping">to_date_select_tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a407"></a>        <span class="src-var">$form </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/DateHelper.html">DateHelper</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$object_name">object_name</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a408"></a>        <span class="src-var">$args </span>= <a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a409"></a>        <span class="src-key">return </span><a href="http://www.php.net/call_user_func_array">call_user_func_array</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$form</span><span class="src-sym">, </span><span class="src-str">'to_date_select_tag'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$args</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a410"></a>    <span class="src-sym">}</span></li>
<li><a name="a411"></a>&nbsp;</li>
<li><a name="a412"></a>    <span class="src-doc">/**</span></li>
<li><a name="a413"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a414"></a><span class="src-doc">     */</span></li>
<li><a name="a415"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_date_select_tag">to_date_select_tag</a><span class="src-sym">(</span><span class="src-var">$options </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a416"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a417"></a>            <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_wrapping">error_wrapping</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_date_select_tag_without_error_wrapping">to_date_select_tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a418"></a>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a419"></a>            <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_date_select_tag_without_error_wrapping">to_date_select_tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a420"></a>        <span class="src-sym">}</span></li>
<li><a name="a421"></a>    <span class="src-sym">}</span></li>
<li><a name="a422"></a>&nbsp;</li>
<li><a name="a423"></a>    <span class="src-doc">/**</span></li>
<li><a name="a424"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a425"></a><span class="src-doc">     *</span></li>
<li><a name="a426"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> attribute_name</span></li>
<li><a name="a427"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object_name</span></li>
<li><a name="a428"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> DateHelper::to_datetime_select_tag()</span></li>
<li><a name="a429"></a><span class="src-doc">     */</span></li>
<li><a name="a430"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_datetime_select_tag_without_error_wrapping">to_datetime_select_tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a431"></a>        <span class="src-var">$form </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/DateHelper.html">DateHelper</a></span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$object_name">object_name</a><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a432"></a>        <span class="src-var">$args </span>= <a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a433"></a>        <span class="src-key">return </span><a href="http://www.php.net/call_user_func_array">call_user_func_array</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$form</span><span class="src-sym">, </span><span class="src-str">'to_datetime_select_tag'</span><span class="src-sym">)</span><span class="src-sym">,</span></li>
<li><a name="a434"></a>                                    <span class="src-var">$args</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a435"></a>    <span class="src-sym">}</span></li>
<li><a name="a436"></a>&nbsp;</li>
<li><a name="a437"></a>    <span class="src-doc">/**</span></li>
<li><a name="a438"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a439"></a><span class="src-doc">     *</span></li>
<li><a name="a440"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> attribute_name</span></li>
<li><a name="a441"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> error_wrapping()</span></li>
<li><a name="a442"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object()</span></li>
<li><a name="a443"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> to_datetime_select_tag_without_error_wrapping</span></li>
<li><a name="a444"></a><span class="src-doc">     */</span></li>
<li><a name="a445"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_datetime_select_tag">to_datetime_select_tag</a><span class="src-sym">(</span><span class="src-var">$options </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a446"></a>        <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/count">count</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a447"></a>            <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_wrapping">error_wrapping</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_datetime_select_tag_without_error_wrapping">to_datetime_select_tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a448"></a>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a449"></a>            <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/ActiveRecordHelper.html#methodto_datetime_select_tag_without_error_wrapping">to_datetime_select_tag_without_error_wrapping</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a450"></a>        <span class="src-sym">}</span></li>
<li><a name="a451"></a>    <span class="src-sym">}</span></li>
<li><a name="a452"></a>&nbsp;</li>
<li><a name="a453"></a>    <span class="src-doc">/**</span></li>
<li><a name="a454"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a455"></a><span class="src-doc">     *</span></li>
<li><a name="a456"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc"> </span><span class="src-doc-var">$html_tag </span></li>
<li><a name="a457"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">boolean </span><span class="src-doc-var">$has_error </span></li>
<li><a name="a458"></a><span class="src-doc">     */</span></li>
<li><a name="a459"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_wrapping">error_wrapping</a><span class="src-sym">(</span><span class="src-var">$html_tag</span><span class="src-sym">, </span><span class="src-var">$has_error</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a460"></a>        <span class="src-key">return </span><span class="src-sym">(</span><span class="src-var">$has_error </span>? <span class="src-str">'&lt;span class=&quot;fieldWithErrors&quot;&gt;' </span>. <span class="src-var">$html_tag </span>. <span class="src-str">'&lt;/span&gt;' </span>: <span class="src-var">$html_tag</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a461"></a>    <span class="src-sym">}</span></li>
<li><a name="a462"></a>&nbsp;</li>
<li><a name="a463"></a>    <span class="src-doc">/**</span></li>
<li><a name="a464"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a465"></a><span class="src-doc">     *</span></li>
<li><a name="a466"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> attribute_name</span></li>
<li><a name="a467"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object()</span></li>
<li><a name="a468"></a><span class="src-doc">     */</span></li>
<li><a name="a469"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_message">error_message</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a470"></a>        <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">errors</span><span class="src-sym">[</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a471"></a>    <span class="src-sym">}</span></li>
<li><a name="a472"></a>&nbsp;</li>
<li><a name="a473"></a>    <span class="src-doc">/**</span></li>
<li><a name="a474"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this method</span></li>
<li><a name="a475"></a><span class="src-doc">     *</span></li>
<li><a name="a476"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> attribute_name</span></li>
<li><a name="a477"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> object()</span></li>
<li><a name="a478"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> ActiveRecord::column_for_attribute()</span></li>
<li><a name="a479"></a><span class="src-doc">     */</span></li>
<li><a name="a480"></a>    <span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodcolumn_type">column_type</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a481"></a>        <span class="src-var">$column </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodobject">object</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">-&gt;</span><span class="src-id">column_for_attribute</span><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#var$attribute_name">attribute_name</a><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a482"></a>        <span class="src-key">return </span><span class="src-var">$column</span><span class="src-sym">[</span><span class="src-str">'type'</span><span class="src-sym">]</span><span class="src-sym">;</span></li>
<li><a name="a483"></a>    <span class="src-sym">}</span></li>
<li><a name="a484"></a>&nbsp;</li>
<li><a name="a485"></a><span class="src-sym">}</span></li>
<li><a name="a486"></a>&nbsp;</li>
<li><a name="a487"></a><span class="src-doc">/**</span></li>
<li><a name="a488"></a><span class="src-doc"> *  Avialble functions for use in views</span></li>
<li><a name="a489"></a><span class="src-doc"> * error_message_on($object, $attribute_name, $prepend_text = &quot;&quot;, $append_text = &quot;&quot;, $css_class = &quot;formError&quot;)</span></li>
<li><a name="a490"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> ActiveRecordHelper::error_message_on()</span></li>
<li><a name="a491"></a><span class="src-doc"> */</span></li>
<li><a name="a492"></a><span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_message_on">error_message_on</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a493"></a>    <span class="src-var">$ar_helper </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/ActiveRecordHelper.html">ActiveRecordHelper</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a494"></a>    <span class="src-var">$args </span>= <a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a495"></a>    <span class="src-key">return </span><a href="http://www.php.net/call_user_func_array">call_user_func_array</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$ar_helper</span><span class="src-sym">, </span><span class="src-str">'error_message_on'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$args</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a496"></a><span class="src-sym">}</span></li>
<li><a name="a497"></a>&nbsp;</li>
<li><a name="a498"></a><span class="src-doc">/**</span></li>
<li><a name="a499"></a><span class="src-doc"> *  error_messages_for($object_name, $options = array())</span></li>
<li><a name="a500"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> ActiveRecordHelper::error_messages_for()</span></li>
<li><a name="a501"></a><span class="src-doc"> */</span></li>
<li><a name="a502"></a><span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methoderror_messages_for">error_messages_for</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a503"></a>    <span class="src-var">$ar_helper </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/ActiveRecordHelper.html">ActiveRecordHelper</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a504"></a>    <span class="src-var">$args </span>= <a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a505"></a>    <span class="src-key">return </span><a href="http://www.php.net/call_user_func_array">call_user_func_array</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$ar_helper</span><span class="src-sym">, </span><span class="src-str">'error_messages_for'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$args</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a506"></a><span class="src-sym">}</span></li>
<li><a name="a507"></a>&nbsp;</li>
<li><a name="a508"></a><span class="src-doc">/**</span></li>
<li><a name="a509"></a><span class="src-doc"> *  form($record_name, $options = array())</span></li>
<li><a name="a510"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> ActiveRecordHelper::form()</span></li>
<li><a name="a511"></a><span class="src-doc"> */</span></li>
<li><a name="a512"></a><span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodform">form</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a513"></a>    <span class="src-var">$ar_helper </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/ActiveRecordHelper.html">ActiveRecordHelper</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a514"></a>    <span class="src-var">$args </span>= <a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a515"></a>    <span class="src-key">return </span><a href="http://www.php.net/call_user_func_array">call_user_func_array</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$ar_helper</span><span class="src-sym">, </span><span class="src-str">'form'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$args</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a516"></a><span class="src-sym">}</span></li>
<li><a name="a517"></a>&nbsp;</li>
<li><a name="a518"></a><span class="src-doc">/**</span></li>
<li><a name="a519"></a><span class="src-doc"> *  Returns a default input tag for the type of object returned by the method. Example</span></li>
<li><a name="a520"></a><span class="src-doc"> *  (title is a VARCHAR column and holds &quot;Hello World&quot;):</span></li>
<li><a name="a521"></a><span class="src-doc"> *   input(&quot;post&quot;, &quot;title&quot;) =&gt;</span></li>
<li><a name="a522"></a><span class="src-doc"> *    &lt;input id=&quot;post_title&quot; name=&quot;post[title]&quot; size=&quot;30&quot; type=&quot;text&quot; value=&quot;Hello World&quot; /&gt;</span></li>
<li><a name="a523"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> ActiveRecordHelper::input()</span></li>
<li><a name="a524"></a><span class="src-doc"> */</span></li>
<li><a name="a525"></a><span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodinput">input</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a526"></a>    <span class="src-var">$ar_helper </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/ActiveRecordHelper.html">ActiveRecordHelper</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a527"></a>    <span class="src-var">$args </span>= <a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a528"></a>    <span class="src-key">return </span><a href="http://www.php.net/call_user_func_array">call_user_func_array</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$ar_helper</span><span class="src-sym">, </span><span class="src-str">'input'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$args</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a529"></a><span class="src-sym">}</span></li>
<li><a name="a530"></a>&nbsp;</li>
<li><a name="a531"></a><span class="src-doc">/**</span></li>
<li><a name="a532"></a><span class="src-doc"> *</span></li>
<li><a name="a533"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> ActiveRecordHelper::input_scaffolding()</span></li>
<li><a name="a534"></a><span class="src-doc"> */</span></li>
<li><a name="a535"></a><span class="src-key">function </span><a href="../PHPonTrax/ActiveRecordHelper.html#methodinput_scaffolding">input_scaffolding</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a536"></a>    <span class="src-var">$ar_helper </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/ActiveRecordHelper.html">ActiveRecordHelper</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a537"></a>    <span class="src-var">$args </span>= <a href="http://www.php.net/func_get_args">func_get_args</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a538"></a>    <span class="src-key">return </span><a href="http://www.php.net/call_user_func_array">call_user_func_array</a><span class="src-sym">(</span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-var">$ar_helper</span><span class="src-sym">, </span><span class="src-str">'input_scaffolding'</span><span class="src-sym">)</span><span class="src-sym">, </span><span class="src-var">$args</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a539"></a><span class="src-sym">}</span></li>
<li><a name="a540"></a>&nbsp;</li>
<li><a name="a541"></a><span class="src-comm">// -- set Emacs parameters --</span></li>
<li><a name="a542"></a><span class="src-comm">// Local variables:</span></li>
<li><a name="a543"></a><span class="src-comm">// tab-width: 4</span></li>
<li><a name="a544"></a><span class="src-comm">// c-basic-offset: 4</span></li>
<li><a name="a545"></a><span class="src-comm">// c-hanging-comment-ender-p: nil</span></li>
<li><a name="a546"></a><span class="src-comm">// indent-tabs-mode: nil</span></li>
<li><a name="a547"></a><span class="src-comm">// End:</span></li>
<li><a name="a548"></a><span class="src-php">?&gt;</span></li>
</ol></pre></div>
</div>
        <div class="credit">
		    <hr />
		    Documentation generated on Thu, 04 May 2006 19:47:15 -0600 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC4</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>
Return current item: PHP on Trax