Location: PHPKode > projects > PHP on Trax > johnpipi-trax-f599562/trax/doc/__filesource/fsource_PHPonTrax__vendortraxaction_viewhelpersform_options_helper.php.html
<html>
<head>
<title>File Source for form_options_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 form_options_helper.php</h1>
<p>Documentation is available at <a href="../PHPonTrax/_vendor_trax_action_view_helpers_form_options_helper_php.html">form_options_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 the FormOptionsHelper 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>&nbsp;</li>
<li><a name="a31"></a><span class="src-doc">/**</span></li>
<li><a name="a32"></a><span class="src-doc"> * All the countries included in the country_options output.</span></li>
<li><a name="a33"></a><span class="src-doc"> */</span></li>
<li><a name="a34"></a><span class="src-key">if</span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">'COUNTRIES'</span><span class="src-sym">,</span><span class="src-var">$GLOBALS</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a35"></a>    <span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'COUNTRIES'</span><span class="src-sym">] </span>= </li>
<li><a name="a36"></a>        <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">&quot;Afghanistan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Albania&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Algeria&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;American Samoa&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Andorra&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Angola&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Anguilla&quot;</span><span class="src-sym">, </span></li>
<li><a name="a37"></a>        <span class="src-str">&quot;Antarctica&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Antigua And Barbuda&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Argentina&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Armenia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Aruba&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Australia&quot;</span><span class="src-sym">, </span></li>
<li><a name="a38"></a>        <span class="src-str">&quot;Austria&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Azerbaijan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Bahamas&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Bahrain&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Bangladesh&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Barbados&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Belarus&quot;</span><span class="src-sym">, </span></li>
<li><a name="a39"></a>        <span class="src-str">&quot;Belgium&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Belize&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Benin&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Bermuda&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Bhutan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Bolivia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Bosnia and Herzegowina&quot;</span><span class="src-sym">, </span></li>
<li><a name="a40"></a>        <span class="src-str">&quot;Botswana&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Bouvet Island&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Brazil&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;British Indian Ocean Territory&quot;</span><span class="src-sym">, </span></li>
<li><a name="a41"></a>        <span class="src-str">&quot;Brunei Darussalam&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Bulgaria&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Burkina Faso&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Burma&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Burundi&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Cambodia&quot;</span><span class="src-sym">, </span></li>
<li><a name="a42"></a>        <span class="src-str">&quot;Cameroon&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Canada&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Cape Verde&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Cayman Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Central African Republic&quot;</span><span class="src-sym">, </span></li>
<li><a name="a43"></a>        <span class="src-str">&quot;Chad&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Chile&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;China&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Christmas Island&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Cocos (Keeling) Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Colombia&quot;</span><span class="src-sym">, </span></li>
<li><a name="a44"></a>        <span class="src-str">&quot;Comoros&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Congo&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Congo, the Democratic Republic of the&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Cook Islands&quot;</span><span class="src-sym">, </span></li>
<li><a name="a45"></a>        <span class="src-str">&quot;Costa Rica&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Cote d'Ivoire&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Croatia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Cuba&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Cyprus&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Czech Republic&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Denmark&quot;</span><span class="src-sym">, </span></li>
<li><a name="a46"></a>        <span class="src-str">&quot;Djibouti&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Dominica&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Dominican Republic&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;East Timor&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Ecuador&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Egypt&quot;</span><span class="src-sym">, </span></li>
<li><a name="a47"></a>        <span class="src-str">&quot;El Salvador&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;England&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Equatorial Guinea&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Eritrea&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Espana&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Estonia&quot;</span><span class="src-sym">, </span></li>
<li><a name="a48"></a>        <span class="src-str">&quot;Ethiopia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Falkland Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Faroe Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Fiji&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Finland&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;France&quot;</span><span class="src-sym">, </span></li>
<li><a name="a49"></a>        <span class="src-str">&quot;French Guiana&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;French Polynesia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;French Southern Territories&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Gabon&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Gambia&quot;</span><span class="src-sym">, </span></li>
<li><a name="a50"></a>        <span class="src-str">&quot;Georgia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Germany&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Ghana&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Gibraltar&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Great Britain&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Greece&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Greenland&quot;</span><span class="src-sym">, </span></li>
<li><a name="a51"></a>        <span class="src-str">&quot;Grenada&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Guadeloupe&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Guam&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Guatemala&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Guinea&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Guinea-Bissau&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Guyana&quot;</span><span class="src-sym">, </span></li>
<li><a name="a52"></a>        <span class="src-str">&quot;Haiti&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Heard and Mc Donald Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Honduras&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Hong Kong&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Hungary&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Iceland&quot;</span><span class="src-sym">, </span></li>
<li><a name="a53"></a>        <span class="src-str">&quot;India&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Indonesia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Ireland&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Israel&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Italy&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Iran&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Iraq&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Jamaica&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Japan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Jordan&quot;</span><span class="src-sym">, </span></li>
<li><a name="a54"></a>        <span class="src-str">&quot;Kazakhstan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Kenya&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Kiribati&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Korea, Republic of&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Korea (South)&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Kuwait&quot;</span><span class="src-sym">, </span></li>
<li><a name="a55"></a>        <span class="src-str">&quot;Kyrgyzstan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Lao People's Democratic Republic&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Latvia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Lebanon&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Lesotho&quot;</span><span class="src-sym">, </span></li>
<li><a name="a56"></a>        <span class="src-str">&quot;Liberia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Liechtenstein&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Lithuania&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Luxembourg&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Macau&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Macedonia&quot;</span><span class="src-sym">, </span></li>
<li><a name="a57"></a>        <span class="src-str">&quot;Madagascar&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Malawi&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Malaysia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Maldives&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Mali&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Malta&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Marshall Islands&quot;</span><span class="src-sym">, </span></li>
<li><a name="a58"></a>        <span class="src-str">&quot;Martinique&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Mauritania&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Mauritius&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Mayotte&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Mexico&quot;</span><span class="src-sym">, </span></li>
<li><a name="a59"></a>        <span class="src-str">&quot;Micronesia, Federated States of&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Moldova, Republic of&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Monaco&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Mongolia&quot;</span><span class="src-sym">, </span></li>
<li><a name="a60"></a>        <span class="src-str">&quot;Montserrat&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Morocco&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Mozambique&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Myanmar&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Namibia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Nauru&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Nepal&quot;</span><span class="src-sym">, </span></li>
<li><a name="a61"></a>        <span class="src-str">&quot;Netherlands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Netherlands Antilles&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;New Caledonia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;New Zealand&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Nicaragua&quot;</span><span class="src-sym">, </span></li>
<li><a name="a62"></a>        <span class="src-str">&quot;Niger&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Nigeria&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Niue&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Norfolk Island&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Northern Ireland&quot;</span><span class="src-sym">, </span></li>
<li><a name="a63"></a>        <span class="src-str">&quot;Northern Mariana Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Norway&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Oman&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Pakistan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Palau&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Panama&quot;</span><span class="src-sym">, </span></li>
<li><a name="a64"></a>        <span class="src-str">&quot;Papua New Guinea&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Paraguay&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Peru&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Philippines&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Pitcairn&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Poland&quot;</span><span class="src-sym">, </span></li>
<li><a name="a65"></a>        <span class="src-str">&quot;Portugal&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Puerto Rico&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Qatar&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Reunion&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Romania&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Russia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Rwanda&quot;</span><span class="src-sym">, </span></li>
<li><a name="a66"></a>        <span class="src-str">&quot;Saint Kitts and Nevis&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Saint Lucia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Saint Vincent and the Grenadines&quot;</span><span class="src-sym">, </span></li>
<li><a name="a67"></a>        <span class="src-str">&quot;Samoa (Indep}ent)&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;San Marino&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Sao Tome and Principe&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Saudi Arabia&quot;</span><span class="src-sym">, </span></li>
<li><a name="a68"></a>        <span class="src-str">&quot;Scotland&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Senegal&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Serbia and Montenegro&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Seychelles&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Sierra Leone&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Singapore&quot;</span><span class="src-sym">, </span></li>
<li><a name="a69"></a>        <span class="src-str">&quot;Slovakia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Slovenia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Solomon Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Somalia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;South Africa&quot;</span><span class="src-sym">, </span></li>
<li><a name="a70"></a>        <span class="src-str">&quot;South Georgia and the South Sandwich Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;South Korea&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Spain&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Sri Lanka&quot;</span><span class="src-sym">, </span></li>
<li><a name="a71"></a>        <span class="src-str">&quot;St. Helena&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;St. Pierre and Miquelon&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Suriname&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Svalbard and Jan Mayen Islands&quot;</span><span class="src-sym">, </span></li>
<li><a name="a72"></a>        <span class="src-str">&quot;Swaziland&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Sweden&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Switzerland&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Taiwan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Tajikistan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Tanzania&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Thailand&quot;</span><span class="src-sym">, </span></li>
<li><a name="a73"></a>        <span class="src-str">&quot;Togo&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Tokelau&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Tonga&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Trinidad&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Trinidad and Tobago&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Tunisia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Turkey&quot;</span><span class="src-sym">, </span></li>
<li><a name="a74"></a>        <span class="src-str">&quot;Turkmenistan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Turks and Caicos Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Tuvalu&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Uganda&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Ukraine&quot;</span><span class="src-sym">, </span></li>
<li><a name="a75"></a>        <span class="src-str">&quot;United Arab Emirates&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;United Kingdom&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;United States&quot;</span><span class="src-sym">, </span></li>
<li><a name="a76"></a>        <span class="src-str">&quot;United States Minor Outlying Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Uruguay&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Uzbekistan&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Vanuatu&quot;</span><span class="src-sym">, </span></li>
<li><a name="a77"></a>        <span class="src-str">&quot;Vatican City State (Holy See)&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Venezuela&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Viet Nam&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Virgin Islands (British)&quot;</span><span class="src-sym">, </span></li>
<li><a name="a78"></a>        <span class="src-str">&quot;Virgin Islands (U.S.)&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Wales&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Wallis and Futuna Islands&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Western Sahara&quot;</span><span class="src-sym">, </span></li>
<li><a name="a79"></a>        <span class="src-str">&quot;Yemen&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Zambia&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;Zimbabwe&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a80"></a><span class="src-sym">}</span></li>
<li><a name="a81"></a>&nbsp;</li>
<li><a name="a82"></a><span class="src-doc">/**</span></li>
<li><a name="a83"></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="a84"></a><span class="src-doc"> */</span></li>
<li><a name="a85"></a><span class="src-key">class </span><a href="../PHPonTrax/FormOptionsHelper.html">FormOptionsHelper</a> <span class="src-key">extends </span><a href="../PHPonTrax/FormHelper.html">FormHelper</a> <span class="src-sym">{</span></li>
<li><a name="a86"></a>    </li>
<li><a name="a87"></a>    <span class="src-doc">/**</span></li>
<li><a name="a88"></a><span class="src-doc">     *  Generate HTML option tags from a list of choices</span></li>
<li><a name="a89"></a><span class="src-doc">     *</span></li>
<li><a name="a90"></a><span class="src-doc">     *  Accepts an array of possible choices and returns a string of</span></li>
<li><a name="a91"></a><span class="src-doc">     *  option tags.  The value of each array element becomes the</span></li>
<li><a name="a92"></a><span class="src-doc">     *  visible text of an option, and the key of the element becomes</span></li>
<li><a name="a93"></a><span class="src-doc">     *  the value returned to the server.  For example:&lt;br /&gt;</span></li>
<li><a name="a94"></a><span class="src-doc">     *  &lt;samp&gt;options_for_select(array('foo','bar'));&lt;/samp&gt;&lt;br /&gt;</span></li>
<li><a name="a95"></a><span class="src-doc">     *  will return:&lt;br /&gt;</span></li>
<li><a name="a96"></a><span class="src-doc">     *  &lt;samp&gt;&lt;option value=&quot;0&quot;&gt;foo&lt;/option&gt;\n&lt;/samp&gt;&lt;br /&gt;</span></li>
<li><a name="a97"></a><span class="src-doc">     *  &lt;samp&gt;&lt;option value=&quot;1&quot;&gt;bar&lt;/option&gt;&lt;/samp&gt;&lt;br /&gt;</span></li>
<li><a name="a98"></a><span class="src-doc">     *</span></li>
<li><a name="a99"></a><span class="src-doc">     *  The optional second argument specifies the array key of an</span></li>
<li><a name="a100"></a><span class="src-doc">     *  option to be initially selected.</span></li>
<li><a name="a101"></a><span class="src-doc">     * </span></li>
<li><a name="a102"></a><span class="src-doc">     *  NOTE: Only the option tags are returned, you have to wrap this</span></li>
<li><a name="a103"></a><span class="src-doc">     *  call in a regular HTML select tag.</span></li>
<li><a name="a104"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string[] </span><span class="src-doc"> Choices</span></li>
<li><a name="a105"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc">  Selected choice</span></li>
<li><a name="a106"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@return </span><span class="src-doc-type">string </span></li>
<li><a name="a107"></a><span class="src-doc">     */</span></li>
<li><a name="a108"></a>    <span class="src-key">function </span><a href="../PHPonTrax/FormOptionsHelper.html#methodoptions_for_select">options_for_select</a><span class="src-sym">(</span><span class="src-var">$choices</span><span class="src-sym">, </span><span class="src-var">$selected </span>= <span class="src-id">null</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a109"></a>        <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="a110"></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">$choices</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a111"></a>            <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$choices </span><span class="src-key">as </span><span class="src-var">$choice_value </span>=&gt; <span class="src-var">$choice_text</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a112"></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">$choice_value</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a113"></a>                    <span class="src-var">$is_selected </span>= <span class="src-sym">(</span><span class="src-var">$choice_value </span>== <span class="src-var">$selected</span><span class="src-sym">)</span></li>
<li><a name="a114"></a>                        ? <span class="src-id">true </span>: <span class="src-id">false</span><span class="src-sym">;   </span></li>
<li><a name="a115"></a>                <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a116"></a>                    <span class="src-var">$is_selected </span>= <span class="src-sym">(</span><span class="src-var">$choice_text </span>== <span class="src-var">$selected</span><span class="src-sym">)</span></li>
<li><a name="a117"></a>                        ? <span class="src-id">true </span>: <span class="src-id">false</span><span class="src-sym">;        </span></li>
<li><a name="a118"></a>                <span class="src-sym">}</span></li>
<li><a name="a119"></a>                <span class="src-key">if</span><span class="src-sym">(</span><span class="src-var">$is_selected</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a120"></a>                    <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-str">&quot;&lt;option value=\&quot;&quot;</span></li>
<li><a name="a121"></a>              . <a href="http://www.php.net/htmlspecialchars">htmlspecialchars</a><span class="src-sym">(</span><span class="src-var">$choice_value</span><span class="src-sym">)</span></li>
<li><a name="a122"></a>              . <span class="src-str">&quot;\&quot; selected=\&quot;selected\&quot;&gt;&quot;</span></li>
<li><a name="a123"></a>              . <a href="http://www.php.net/htmlspecialchars">htmlspecialchars</a><span class="src-sym">(</span><span class="src-var">$choice_text</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/option&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a124"></a>                <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a125"></a>                    <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-sym">] </span>= <span class="src-str">&quot;&lt;option value=\&quot;&quot;</span></li>
<li><a name="a126"></a>              . <a href="http://www.php.net/htmlspecialchars">htmlspecialchars</a><span class="src-sym">(</span><span class="src-var">$choice_value</span><span class="src-sym">)</span></li>
<li><a name="a127"></a>              . <span class="src-str">&quot;\&quot;&gt;&quot;</span></li>
<li><a name="a128"></a>              . <a href="http://www.php.net/htmlspecialchars">htmlspecialchars</a><span class="src-sym">(</span><span class="src-var">$choice_text</span><span class="src-sym">)</span>.<span class="src-str">&quot;&lt;/option&gt;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a129"></a>                <span class="src-sym">}                        </span></li>
<li><a name="a130"></a>            <span class="src-sym">}    </span></li>
<li><a name="a131"></a>        <span class="src-sym">}</span></li>
<li><a name="a132"></a>        <span class="src-key">return </span><a href="http://www.php.net/implode">implode</a><span class="src-sym">(</span><span class="src-str">&quot;\n&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="a133"></a>    <span class="src-sym">}</span></li>
<li><a name="a134"></a>    </li>
<li><a name="a135"></a>    <span class="src-doc">/**</span></li>
<li><a name="a136"></a><span class="src-doc">     *  Returns a string of option tags that have been compiled by</span></li>
<li><a name="a137"></a><span class="src-doc">     *  iterating over the +collection+ and assigning the result of a</span></li>
<li><a name="a138"></a><span class="src-doc">     *  call to the +value_method+ as the option value and the</span></li>
<li><a name="a139"></a><span class="src-doc">     *  +text_method+ as the option text. If +selected_value+ is</span></li>
<li><a name="a140"></a><span class="src-doc">     *  specified, the element returning a match on +value_method+ will</span></li>
<li><a name="a141"></a><span class="src-doc">     *  get the selected option tag.</span></li>
<li><a name="a142"></a><span class="src-doc">     *</span></li>
<li><a name="a143"></a><span class="src-doc">     *  Example (call, result). Imagine a loop iterating over each</span></li>
<li><a name="a144"></a><span class="src-doc">     *  +person+ in &lt;tt&gt;@project.people&lt;/tt&gt; to generate an input tag:</span></li>
<li><a name="a145"></a><span class="src-doc">     *   options_from_collection_for_select(@project.people, &quot;id&quot;, &quot;name&quot;)</span></li>
<li><a name="a146"></a><span class="src-doc">     *     &lt;option value=&quot;#{person.id}&quot;&gt;#{person.name}&lt;/option&gt;</span></li>
<li><a name="a147"></a><span class="src-doc">     *</span></li>
<li><a name="a148"></a><span class="src-doc">     *  NOTE: Only the option tags are returned, you have to wrap this call</span></li>
<li><a name="a149"></a><span class="src-doc">     *  in a regular HTML select tag.</span></li>
<li><a name="a150"></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="a151"></a><span class="src-doc">     */</span></li>
<li><a name="a152"></a>    <span class="src-key">function </span><a href="../PHPonTrax/FormOptionsHelper.html#methodoptions_from_collection_for_select">options_from_collection_for_select</a><span class="src-sym">(</span><span class="src-var">$collection</span><span class="src-sym">, </span><span class="src-var">$attribute_value</span><span class="src-sym">,</span></li>
<li><a name="a153"></a>                                                <span class="src-var">$attribute_text</span><span class="src-sym">,</span></li>
<li><a name="a154"></a>                                                <span class="src-var">$selected_value </span>= <span class="src-id">null</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a155"></a>        <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="a156"></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">$collection</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a157"></a>            <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$collection </span><span class="src-key">as </span><span class="src-var">$object</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a158"></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</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a159"></a>                    <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-var">$object</span><span class="src-sym">-&gt;</span><span class="src-id">send</span><span class="src-sym">(</span><span class="src-var">$attribute_value</span><span class="src-sym">)</span><span class="src-sym">] </span>=</li>
<li><a name="a160"></a>                        <span class="src-var">$object</span><span class="src-sym">-&gt;</span><span class="src-id">send</span><span class="src-sym">(</span><span class="src-var">$attribute_text</span><span class="src-sym">)</span><span class="src-sym">;            </span></li>
<li><a name="a161"></a>                <span class="src-sym">}</span></li>
<li><a name="a162"></a>            <span class="src-sym">}    </span></li>
<li><a name="a163"></a>        <span class="src-sym">}       </span></li>
<li><a name="a164"></a>        <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodoptions_for_select">options_for_select</a><span class="src-sym">(</span><span class="src-var">$options</span><span class="src-sym">, </span><span class="src-var">$selected_value</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a165"></a>    <span class="src-sym">}</span></li>
<li><a name="a166"></a>    </li>
<li><a name="a167"></a>    <span class="src-doc">/**</span></li>
<li><a name="a168"></a><span class="src-doc">     *  Generate HTML options for world countries</span></li>
<li><a name="a169"></a><span class="src-doc">     *</span></li>
<li><a name="a170"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc"> Array key of country initially selected</span></li>
<li><a name="a171"></a><span class="src-doc">     *   NOTE: Only the option tags are returned, you have to wrap this</span></li>
<li><a name="a172"></a><span class="src-doc">     *   call in a regular HTML select tag.</span></li>
<li><a name="a173"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> &lt;b&gt;FIXME:&lt;/b&gt; Second argument doesn't work</span></li>
<li><a name="a174"></a><span class="src-doc">     */</span></li>
<li><a name="a175"></a>    <span class="src-key">function </span><a href="../PHPonTrax/FormOptionsHelper.html#methodcountry_options_for_select">country_options_for_select</a><span class="src-sym">(</span><span class="src-var">$selected </span>= <span class="src-id">null</span><span class="src-sym">,</span></li>
<li><a name="a176"></a>                    <span class="src-var">$priority_countries </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="a177"></a>        <span class="src-var">$country_options </span>= <span class="src-str">&quot;&quot;</span><span class="src-sym">;</span></li>
<li><a name="a178"></a>        </li>
<li><a name="a179"></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">$priority_countries</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a180"></a>            <span class="src-var">$country_options </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodoptions_for_select">options_for_select</a><span class="src-sym">(</span><span class="src-var">$priority_countries</span><span class="src-sym">,</span></li>
<li><a name="a181"></a>                              <span class="src-var">$selected</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a182"></a>            <span class="src-var">$country_options </span>.= <span class="src-str">&quot;&lt;option value=\&quot;\&quot;&gt;-------------&lt;/option&gt;\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a183"></a>            <span class="src-key">foreach</span><span class="src-sym">(</span><span class="src-var">$priority_countries </span><span class="src-key">as </span><span class="src-var">$country</span><span class="src-sym">) </span><span class="src-sym">{ </span></li>
<li><a name="a184"></a>                unset<span class="src-sym">(</span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'COUNTRIES'</span><span class="src-sym">]</span><span class="src-sym">[</span><a href="http://www.php.net/array_search">array_search</a><span class="src-sym">(</span><span class="src-var">$country</span><span class="src-sym">,</span></li>
<li><a name="a185"></a>                             <span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'COUNTRIES'</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">]</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a186"></a>            <span class="src-sym">}</span></li>
<li><a name="a187"></a>        <span class="src-sym">}</span></li>
<li><a name="a188"></a>        </li>
<li><a name="a189"></a>        <span class="src-var">$country_options </span>.= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodoptions_for_select">options_for_select</a><span class="src-sym">(</span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'COUNTRIES'</span><span class="src-sym">]</span><span class="src-sym">,</span></li>
<li><a name="a190"></a>                              <span class="src-var">$selected</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a191"></a> </li>
<li><a name="a192"></a>        <span class="src-key">return </span><span class="src-var">$country_options</span><span class="src-sym">;</span></li>
<li><a name="a193"></a>    <span class="src-sym">}</span></li>
<li><a name="a194"></a>    </li>
<li><a name="a195"></a>    <span class="src-doc">/**</span></li>
<li><a name="a196"></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="a197"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> add_default_name_and_id()</span></li>
<li><a name="a198"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> add_options()</span></li>
<li><a name="a199"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> content_tag()</span></li>
<li><a name="a200"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> value()</span></li>
<li><a name="a201"></a><span class="src-doc">     */</span></li>
<li><a name="a202"></a>    <span class="src-key">function </span><a href="../PHPonTrax/FormOptionsHelper.html#methodto_select_tag">to_select_tag</a><span class="src-sym">(</span><span class="src-var">$choices</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">, </span><span class="src-var">$html_options</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a203"></a>        <span class="src-var">$html_options </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormHelper.html#methodadd_default_name_and_id">add_default_name_and_id</a><span class="src-sym">(</span><span class="src-var">$html_options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a204"></a>        <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodcontent_tag">content_tag</a><span class="src-sym">(</span></li>
<li><a name="a205"></a>             <span class="src-str">&quot;select&quot;</span><span class="src-sym">,</span></li>
<li><a name="a206"></a>             <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodadd_options">add_options</a><span class="src-sym">(</span></li>
<li><a name="a207"></a>                       <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodoptions_for_select">options_for_select</a><span class="src-sym">(</span><span class="src-var">$choices</span><span class="src-sym">, </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodvalue">value</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">,</span></li>
<li><a name="a208"></a>                       <span class="src-var">$options</span><span class="src-sym">,</span></li>
<li><a name="a209"></a>                       <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodvalue">value</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">,</span></li>
<li><a name="a210"></a>             <span class="src-var">$html_options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a211"></a>    <span class="src-sym">}</span></li>
<li><a name="a212"></a>    </li>
<li><a name="a213"></a>    <span class="src-doc">/**</span></li>
<li><a name="a214"></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="a215"></a><span class="src-doc">     *</span></li>
<li><a name="a216"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> add_default_name_and_id()</span></li>
<li><a name="a217"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> add_options()</span></li>
<li><a name="a218"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> content_tag()</span></li>
<li><a name="a219"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> options_from_collection_for_select()</span></li>
<li><a name="a220"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> value()</span></li>
<li><a name="a221"></a><span class="src-doc">     */</span></li>
<li><a name="a222"></a>    <span class="src-key">function </span><a href="../PHPonTrax/FormOptionsHelper.html#methodto_collection_select_tag">to_collection_select_tag</a><span class="src-sym">(</span><span class="src-var">$collection</span><span class="src-sym">, </span><span class="src-var">$attribute_value</span><span class="src-sym">,</span></li>
<li><a name="a223"></a>                                      <span class="src-var">$attribute_text</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">,</span></li>
<li><a name="a224"></a>                                      <span class="src-var">$html_options</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a225"></a>        <span class="src-var">$html_options </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormHelper.html#methodadd_default_name_and_id">add_default_name_and_id</a><span class="src-sym">(</span><span class="src-var">$html_options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a226"></a>        <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodcontent_tag">content_tag</a><span class="src-sym">(</span></li>
<li><a name="a227"></a>          <span class="src-str">&quot;select&quot;</span><span class="src-sym">,</span></li>
<li><a name="a228"></a>          <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodadd_options">add_options</a><span class="src-sym">(</span></li>
<li><a name="a229"></a>            <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodoptions_from_collection_for_select">options_from_collection_for_select</a><span class="src-sym">(</span><span class="src-var">$collection</span><span class="src-sym">,</span></li>
<li><a name="a230"></a>                                                      <span class="src-var">$attribute_value</span><span class="src-sym">,</span></li>
<li><a name="a231"></a>                                                      <span class="src-var">$attribute_text</span><span class="src-sym">,</span></li>
<li><a name="a232"></a>                                                      <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodvalue">value</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">,</span></li>
<li><a name="a233"></a>            <span class="src-var">$options</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#methodvalue">value</a><span class="src-sym">(</span><span class="src-sym">))</span><span class="src-sym">,</span></li>
<li><a name="a235"></a>         <span class="src-var">$html_options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a236"></a>    <span class="src-sym">}</span></li>
<li><a name="a237"></a>    </li>
<li><a name="a238"></a>    <span class="src-doc">/**</span></li>
<li><a name="a239"></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="a240"></a><span class="src-doc">     *</span></li>
<li><a name="a241"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> add_default_name_and_id()</span></li>
<li><a name="a242"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> add_options()</span></li>
<li><a name="a243"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> content_tag()</span></li>
<li><a name="a244"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> value</span></li>
<li><a name="a245"></a><span class="src-doc">     */</span></li>
<li><a name="a246"></a>    <span class="src-key">function </span><a href="../PHPonTrax/FormOptionsHelper.html#methodto_country_select_tag">to_country_select_tag</a><span class="src-sym">(</span><span class="src-var">$priority_countries</span><span class="src-sym">,</span></li>
<li><a name="a247"></a>                                   <span class="src-var">$options</span><span class="src-sym">, </span><span class="src-var">$html_options</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a248"></a>        <span class="src-var">$html_options </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormHelper.html#methodadd_default_name_and_id">add_default_name_and_id</a><span class="src-sym">(</span><span class="src-var">$html_options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a249"></a>        <span class="src-key">return </span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodcontent_tag">content_tag</a><span class="src-sym">(</span></li>
<li><a name="a250"></a>                <span class="src-str">&quot;select&quot;</span><span class="src-sym">,</span></li>
<li><a name="a251"></a>                <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodadd_options">add_options</a><span class="src-sym">(</span></li>
<li><a name="a252"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodcountry_options_for_select">country_options_for_select</a><span class="src-sym">(</span><span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodvalue">value</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">,</span></li>
<li><a name="a253"></a>                                                          <span class="src-var">$priority_countries</span><span class="src-sym">)</span><span class="src-sym">,</span></li>
<li><a name="a254"></a>                        <span class="src-var">$options</span><span class="src-sym">,</span></li>
<li><a name="a255"></a>                        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-var">value</span><span class="src-sym">)</span><span class="src-sym">,</span></li>
<li><a name="a256"></a>                <span class="src-var">$html_options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a257"></a>    <span class="src-sym">}</span></li>
<li><a name="a258"></a>&nbsp;</li>
<li><a name="a259"></a>    <span class="src-doc">/**</span></li>
<li><a name="a260"></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="a261"></a><span class="src-doc">     *</span></li>
<li><a name="a262"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span></li>
<li><a name="a263"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string[] </span></li>
<li><a name="a264"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span></li>
<li><a name="a265"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> &lt;b&gt;FIXME:&lt;/b&gt; Why the third argument?  It's overwritten!</span></li>
<li><a name="a266"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> value()</span></li>
<li><a name="a267"></a><span class="src-doc">     */</span></li>
<li><a name="a268"></a>    <span class="src-key">private </span><span class="src-key">function </span><a href="../PHPonTrax/FormOptionsHelper.html#methodadd_options">add_options</a><span class="src-sym">(</span><span class="src-var">$option_tags</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">, </span><span class="src-var">$value </span>= <span class="src-id">null</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a269"></a>        <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">&quot;include_blank&quot;</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">)</span></li>
<li><a name="a270"></a>           &amp;&amp; <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">&quot;include_blank&quot;</span><span class="src-sym">] </span>== <span class="src-id">true</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a271"></a>            <span class="src-var">$option_tags </span>= <span class="src-str">&quot;&lt;option value=\&quot;\&quot;&gt;&lt;/option&gt;\n&quot; </span>. <span class="src-var">$option_tags</span><span class="src-sym">;</span></li>
<li><a name="a272"></a>        <span class="src-sym">} </span></li>
<li><a name="a273"></a>        <span class="src-var">$value </span>= <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/Helpers.html#methodvalue">value</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a274"></a>        <span class="src-key">if</span><span class="src-sym">(</span><span class="src-key">empty</span><span class="src-sym">(</span><span class="src-var">$value</span><span class="src-sym">) </span>&amp;&amp; <a href="http://www.php.net/array_key_exists">array_key_exists</a><span class="src-sym">(</span><span class="src-str">'prompt'</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="a275"></a>            <span class="src-var">$text </span>= <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'prompt'</span><span class="src-sym">] </span>? <span class="src-var">$options</span><span class="src-sym">[</span><span class="src-str">'prompt'</span><span class="src-sym">] </span>: <span class="src-str">&quot;Please select&quot;</span><span class="src-sym">;</span></li>
<li><a name="a276"></a>            <span class="src-key">return </span><span class="src-sym">(</span><span class="src-str">&quot;</span><span class="src-str">&lt;<span class="src-id">option</span> <span class="src-id">value</span>=\&quot;\&quot;&gt;<span class="src-var">$text</span>&lt;/<span class="src-id">option</span>&gt;\n</span><span class="src-str">&quot; </span>. <span class="src-var">$option_tags</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a277"></a>        <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{</span></li>
<li><a name="a278"></a>            <span class="src-key">return </span><span class="src-var">$option_tags</span><span class="src-sym">;</span></li>
<li><a name="a279"></a>        <span class="src-sym">}        </span></li>
<li><a name="a280"></a>    <span class="src-sym">}</span></li>
<li><a name="a281"></a><span class="src-sym">}</span></li>
<li><a name="a282"></a>&nbsp;</li>
<li><a name="a283"></a><span class="src-doc">/**</span></li>
<li><a name="a284"></a><span class="src-doc"> *  Create a new FormOptionsHelper object and call its to_select_tag() method</span></li>
<li><a name="a285"></a><span class="src-doc"> *</span></li>
<li><a name="a286"></a><span class="src-doc"> *  Create a select tag and a series of contained option tags for the</span></li>
<li><a name="a287"></a><span class="src-doc"> *  provided object and method.  The option currently held by the</span></li>
<li><a name="a288"></a><span class="src-doc"> *  object will be selected, provided that the object is available.</span></li>
<li><a name="a289"></a><span class="src-doc"> *  See options_for_select for the required format of the choices parameter.</span></li>
<li><a name="a290"></a><span class="src-doc"> *</span></li>
<li><a name="a291"></a><span class="src-doc"> * Example with $post-&gt;person_id =&gt; 1:</span></li>
<li><a name="a292"></a><span class="src-doc"> *   $person = new Person;</span></li>
<li><a name="a293"></a><span class="src-doc"> *   $people = $person-&gt;find_all();</span></li>
<li><a name="a294"></a><span class="src-doc"> *   foreach($people as $person) {</span></li>
<li><a name="a295"></a><span class="src-doc"> *      $choices[$person-&gt;id] = $person-&gt;first_name;</span></li>
<li><a name="a296"></a><span class="src-doc"> *   }</span></li>
<li><a name="a297"></a><span class="src-doc"> *   select(&quot;post&quot;, &quot;person_id&quot;, $choices, array(&quot;include_blank&quot; =&gt; true))</span></li>
<li><a name="a298"></a><span class="src-doc"> *</span></li>
<li><a name="a299"></a><span class="src-doc"> * could become:</span></li>
<li><a name="a300"></a><span class="src-doc"> *</span></li>
<li><a name="a301"></a><span class="src-doc"> *   &lt;select name=&quot;post[person_id]&quot;&gt;</span></li>
<li><a name="a302"></a><span class="src-doc"> *     &lt;option&gt;&lt;/option&gt;</span></li>
<li><a name="a303"></a><span class="src-doc"> *     &lt;option value=&quot;1&quot; selected=&quot;selected&quot;&gt;David&lt;/option&gt;</span></li>
<li><a name="a304"></a><span class="src-doc"> *     &lt;option value=&quot;2&quot;&gt;Sam&lt;/option&gt;</span></li>
<li><a name="a305"></a><span class="src-doc"> *     &lt;option value=&quot;3&quot;&gt;Tobias&lt;/option&gt;</span></li>
<li><a name="a306"></a><span class="src-doc"> *   &lt;/select&gt;</span></li>
<li><a name="a307"></a><span class="src-doc"> *</span></li>
<li><a name="a308"></a><span class="src-doc"> *  This can be used to provide a functionault set of options in the</span></li>
<li><a name="a309"></a><span class="src-doc"> *  standard way: before r}ering the create form, a new model instance</span></li>
<li><a name="a310"></a><span class="src-doc"> *  is assigned the functional options and bound to</span></li>
<li><a name="a311"></a><span class="src-doc"> *  </span><span class="src-doc-tag">@model_name.</span><span class="src-doc"> Usually this model is not saved to the</span></li>
<li><a name="a312"></a><span class="src-doc"> *   database. Instead, a second model object is created when the</span></li>
<li><a name="a313"></a><span class="src-doc"> *   create request is received.  This allows the user to submit a form</span></li>
<li><a name="a314"></a><span class="src-doc"> *   page more than once with the expected results of creating multiple</span></li>
<li><a name="a315"></a><span class="src-doc"> *   records.  In addition, this allows a single partial to be used to</span></li>
<li><a name="a316"></a><span class="src-doc"> *   generate form inputs for both edit and create forms.</span></li>
<li><a name="a317"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this function</span></li>
<li><a name="a318"></a><span class="src-doc"> */</span></li>
<li><a name="a319"></a><span class="src-key">function </span><a href="../PHPonTrax/_vendor_trax_action_view_helpers_form_options_helper_php.html#functionselect">select</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">$choices</span><span class="src-sym">,</span></li>
<li><a name="a320"></a>        <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><span class="src-var">$html_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="a321"></a>    <span class="src-var">$form </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/FormOptionsHelper.html">FormOptionsHelper</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="a322"></a>    <span class="src-key">return </span><span class="src-var">$form</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodto_select_tag">to_select_tag</a><span class="src-sym">(</span><span class="src-var">$choices</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">, </span><span class="src-var">$html_options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a323"></a><span class="src-sym">}</span></li>
<li><a name="a324"></a>&nbsp;</li>
<li><a name="a325"></a><span class="src-doc">/**</span></li>
<li><a name="a326"></a><span class="src-doc"> *  Create a new FormOptionsHelper object and call its to_collection_select_tag() method</span></li>
<li><a name="a327"></a><span class="src-doc"> *</span></li>
<li><a name="a328"></a><span class="src-doc"> * Return select and option tags for the given object and method using</span></li>
<li><a name="a329"></a><span class="src-doc"> * options_from_collection_for_select to generate the list of option tags.</span></li>
<li><a name="a330"></a><span class="src-doc"> *</span></li>
<li><a name="a331"></a><span class="src-doc"> * Example with $post-&gt;person_id =&gt; 1:</span></li>
<li><a name="a332"></a><span class="src-doc"> *   $person = new Person;</span></li>
<li><a name="a333"></a><span class="src-doc"> *   $people = $person-&gt;find_all();</span></li>
<li><a name="a334"></a><span class="src-doc"> *   collection_select(&quot;post&quot;, &quot;person_id&quot;, $people, &quot;id&quot;, &quot;first_name&quot;, array(&quot;include_blank&quot; =&gt; true))</span></li>
<li><a name="a335"></a><span class="src-doc"> *</span></li>
<li><a name="a336"></a><span class="src-doc"> * could become:</span></li>
<li><a name="a337"></a><span class="src-doc"> *</span></li>
<li><a name="a338"></a><span class="src-doc"> *   &lt;select name=&quot;post[person_id]&quot;&gt;</span></li>
<li><a name="a339"></a><span class="src-doc"> *     &lt;option&gt;&lt;/option&gt;</span></li>
<li><a name="a340"></a><span class="src-doc"> *     &lt;option value=&quot;1&quot; selected=&quot;selected&quot;&gt;David&lt;/option&gt;</span></li>
<li><a name="a341"></a><span class="src-doc"> *     &lt;option value=&quot;2&quot;&gt;Sam&lt;/option&gt;</span></li>
<li><a name="a342"></a><span class="src-doc"> *     &lt;option value=&quot;3&quot;&gt;Tobias&lt;/option&gt;</span></li>
<li><a name="a343"></a><span class="src-doc"> *   &lt;/select&gt;</span></li>
<li><a name="a344"></a><span class="src-doc"> *</span></li>
<li><a name="a345"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this function</span></li>
<li><a name="a346"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> FormOptionsHelper::to_collection_select_tag()</span></li>
<li><a name="a347"></a><span class="src-doc"> */</span></li>
<li><a name="a348"></a><span class="src-key">function </span><a href="../PHPonTrax/_vendor_trax_action_view_helpers_form_options_helper_php.html#functioncollection_select">collection_select</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">$collection</span><span class="src-sym">,</span></li>
<li><a name="a349"></a>                           <span class="src-var">$attribute_value</span><span class="src-sym">, </span><span class="src-var">$attribute_text</span><span class="src-sym">,</span></li>
<li><a name="a350"></a>                           <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><span class="src-var">$html_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="a351"></a>    <span class="src-var">$form </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/FormOptionsHelper.html">FormOptionsHelper</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="a352"></a>    <span class="src-key">return </span><span class="src-var">$form</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodto_collection_select_tag">to_collection_select_tag</a><span class="src-sym">(</span><span class="src-var">$collection</span><span class="src-sym">, </span><span class="src-var">$attribute_value</span><span class="src-sym">,</span></li>
<li><a name="a353"></a>                                           <span class="src-var">$attribute_text</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">,</span></li>
<li><a name="a354"></a>                                           <span class="src-var">$html_options</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a355"></a><span class="src-sym">}</span></li>
<li><a name="a356"></a>&nbsp;</li>
<li><a name="a357"></a><span class="src-doc">/**</span></li>
<li><a name="a358"></a><span class="src-doc"> *  Create a new FormOptionsHelper object and call its to_country_select_tag() method</span></li>
<li><a name="a359"></a><span class="src-doc"> *</span></li>
<li><a name="a360"></a><span class="src-doc"> * Return select and option tags for the given object and method, using country_options_for_select to generate the list of option tags.</span></li>
<li><a name="a361"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Document this function</span></li>
<li><a name="a362"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> FormOptionsHelper::country_select()</span></li>
<li><a name="a363"></a><span class="src-doc"> */</span></li>
<li><a name="a364"></a><span class="src-key">function </span><a href="../PHPonTrax/_vendor_trax_action_view_helpers_form_options_helper_php.html#functioncountry_select">country_select</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">$priority_countries </span>= <span class="src-id">null</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><span class="src-var">$html_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="a365"></a>    <span class="src-var">$form </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/FormOptionsHelper.html">FormOptionsHelper</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="a366"></a>    <span class="src-key">return </span><span class="src-var">$form</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodto_country_select_tag">to_country_select_tag</a><span class="src-sym">(</span><span class="src-var">$priority_countries</span><span class="src-sym">, </span><span class="src-var">$options</span><span class="src-sym">, </span><span class="src-var">$html_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>&nbsp;</li>
<li><a name="a369"></a><span class="src-doc">/**</span></li>
<li><a name="a370"></a><span class="src-doc"> *  Create a new FormOptionsHelper object and call its options_for_select() method</span></li>
<li><a name="a371"></a><span class="src-doc"> *</span></li>
<li><a name="a372"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string[] </span><span class="src-doc"> List of choices</span></li>
<li><a name="a373"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">integer </span><span class="src-doc">  Index of the selected choice</span></li>
<li><a name="a374"></a><span class="src-doc"> *  </span><span class="src-doc-coretag">@uses</span><span class="src-doc"> FormOptionsHelper::options_for_select()</span></li>
<li><a name="a375"></a><span class="src-doc"> */</span></li>
<li><a name="a376"></a><span class="src-key">function </span><a href="../PHPonTrax/FormOptionsHelper.html#methodoptions_for_select">options_for_select</a><span class="src-sym">(</span><span class="src-var">$choices</span><span class="src-sym">, </span><span class="src-var">$selected </span>= <span class="src-id">null</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a377"></a>    <span class="src-var">$form </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/FormOptionsHelper.html">FormOptionsHelper</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a378"></a>    <span class="src-key">return </span><span class="src-var">$form</span><span class="src-sym">-&gt;</span><a href="../PHPonTrax/FormOptionsHelper.html#methodoptions_for_select">options_for_select</a><span class="src-sym">(</span><span class="src-var">$choices</span><span class="src-sym">, </span><span class="src-var">$selected</span><span class="src-sym">)</span><span class="src-sym">;    </span></li>
<li><a name="a379"></a><span class="src-sym">}</span></li>
<li><a name="a380"></a>&nbsp;</li>
<li><a name="a381"></a><span class="src-comm">// -- set Emacs parameters --</span></li>
<li><a name="a382"></a><span class="src-comm">// Local variables:</span></li>
<li><a name="a383"></a><span class="src-comm">// tab-width: 4</span></li>
<li><a name="a384"></a><span class="src-comm">// c-basic-offset: 4</span></li>
<li><a name="a385"></a><span class="src-comm">// c-hanging-comment-ender-p: nil</span></li>
<li><a name="a386"></a><span class="src-comm">// indent-tabs-mode: nil</span></li>
<li><a name="a387"></a><span class="src-comm">// End:</span></li>
<li><a name="a388"></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:42 -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