65
65
<a name="l00018"></a><a class="code" href="classagStaffHelper.html">00018</a> <span class="keyword">class </span><a class="code" href="classagStaffHelper.html" title="Provides bulk-staff manipulation methods.">agStaffHelper</a>
66
66
<a name="l00019"></a>00019 {
67
67
<a name="l00020"></a>00020
68
<a name="l00021"></a>00021 <span class="keyword">public</span> <span class="keyword">static</span> function getStaffResourceTypes()
68
<a name="l00021"></a>00021 <span class="keyword">public</span> <span class="keyword">static</span> function getStaffResourceTypes($returnAbbr = FALSE)
69
69
<a name="l00022"></a>00022 {
70
<a name="l00023"></a>00023 $staffResourceTypes = agDoctrineQuery::create()
71
<a name="l00024"></a>00024 ->select(<span class="stringliteral">'id, staff_resource_type'</span>)
72
<a name="l00025"></a>00025 ->from(<span class="stringliteral">'agStaffResourceType'</span>)
73
<a name="l00026"></a>00026 ->execute(array(), <span class="stringliteral">'key_value_pair'</span>);
74
<a name="l00027"></a>00027 <span class="keywordflow">return</span> $staffResourceTypes;
75
<a name="l00028"></a>00028 }
76
<a name="l00029"></a>00029
77
<a name="l00030"></a>00030 }
70
<a name="l00023"></a>00023 $typeField = <span class="stringliteral">'staff_resource_type'</span>;
71
<a name="l00024"></a>00024
72
<a name="l00025"></a>00025 <span class="keywordflow">if</span> ($returnAbbr) { $typeField = <span class="stringliteral">'staff_resource_type_abbr'</span>; }
73
<a name="l00026"></a>00026
74
<a name="l00027"></a>00027 $staffResourceTypes = agDoctrineQuery::create()
75
<a name="l00028"></a>00028 ->select(<span class="stringliteral">'id, '</span> . $typeField)
76
<a name="l00029"></a>00029 ->from(<span class="stringliteral">'agStaffResourceType'</span>)
77
<a name="l00030"></a>00030 ->execute(array(), <span class="stringliteral">'key_value_pair'</span>);
78
<a name="l00031"></a>00031 <span class="keywordflow">return</span> $staffResourceTypes;
79
<a name="l00032"></a>00032 }
80
<a name="l00033"></a>00033
81
<a name="l00034"></a>00034 }
80
84
<!--- window showing the filter options -->