當前位置: 首頁>>代碼示例>>PHP>>正文


PHP category::tree方法代碼示例

本文整理匯總了PHP中category::tree方法的典型用法代碼示例。如果您正苦於以下問題:PHP category::tree方法的具體用法?PHP category::tree怎麽用?PHP category::tree使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在category的用法示例。


在下文中一共展示了category::tree方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

print '<br/>';
print '<span>';
print '<a href="#" id="add_new_category">' . Kohana::lang('ui_main.add') . '</a>';
print '</span>';
?>
 
                                </div>

			                    <div class="report_category">
                        	    <?php 
$selected_categories = array();
if (!empty($form['incident_category']) && is_array($form['incident_category'])) {
    $selected_categories = $form['incident_category'];
}
$columns = 2;
echo category::tree($categories, $selected_categories, 'incident_category', $columns);
?>
			                       								</div>
							</div>
							
							<div id="custom_forms">
								<?php 
foreach ($disp_custom_fields as $field_id => $field_property) {
    echo "<div class=\"row\">";
    echo "<h4>" . $field_property['field_name'] . "</h4>";
    if ($field_property['field_type'] == 1) {
        // Text Field
        // Is this a date field?
        if ($field_property['field_isdate'] == 1) {
            echo form::input('custom_field[' . $field_id . ']', $form['custom_field'][$field_id], ' id="custom_field_' . $field_id . '" class="text"');
            echo '<script type="text/javascript">
開發者ID:hagaeru3sei,項目名稱:Ushahidi_Web,代碼行數:31,代碼來源:reports_edit.php

示例2: htmlspecialchars

								<?php 
echo form::textarea('action_email_body', '');
?>
							</div>

							<div class="tab_form_item" id="action_form_add_category" style="margin-right:75px;">
								<h4><a href="#" class="tooltip" title="<?php 
echo htmlspecialchars(Kohana::lang("tooltips.actions.add_to_category"));
?>
"><?php 
echo Kohana::lang('ui_admin.add_to_category');
?>
:</a></h4>
								<?php 
// categories, selected_categories, form field name, number of columns
echo category::tree($categories, FALSE, array(), 'action_add_category', 2);
?>
							</div>

							<div class="tab_form_item" id="action_form_report_title" style="margin-right:75px;">
								<h4><a href="#" class="tooltip" title="<?php 
echo htmlspecialchars(Kohana::lang("tooltips.actions.report_title"));
?>
"><?php 
echo Kohana::lang('ui_admin.report_title');
?>
:</a></h4>
								<?php 
echo form::input('action_report_title', '');
?>
							</div>
開發者ID:nemmy,項目名稱:Ushahidi_Web,代碼行數:31,代碼來源:actions.php

示例3: is_array

</h2>
		
		<div style="clear: left; width: 100%; float: left;">
			<input type="checkbox" id="category_all" name="category_all" onclick="CheckAll(this.id, 'category')"/><strong><?php 
echo utf8::strtoupper(Kohana::lang('ui_main.select_all'));
?>
</strong>
		</div>
		<?php 
$selected_categories = (!empty($form['incident_category']) and is_array($form['incident_category'])) ? $selected_categories = $form['incident_category'] : array();
if (method_exists('category', 'form_tree')) {
    echo category::form_tree('category', $selected_categories, 2, TRUE);
} elseif (Kohana::config('settings.ushahidi_version') >= 2.4 and Kohana::config('settings.ushahidi_version') <= 2.5) {
    echo category::tree(ORM::factory('category')->find_all(), TRUE, $selected_categories, 'category', 2, TRUE);
} elseif (Kohana::config('settings.ushahidi_version') < 2.4) {
    echo category::tree(ORM::factory('category')->find_all(), $selected_categories, 'category', 2, TRUE);
}
?>
	</div>
	<div>
		<!-- JP: Reformated the layout. -->
		<table style="width: 100%; clear: both;">
			<tr>
				<td style="width: 50%">
					<h2><?php 
echo Kohana::lang('ui_main.verification');
?>
</h2>
					<table>
						<tr>
							<td>
開發者ID:niiyatii,項目名稱:crowdmap,代碼行數:31,代碼來源:download_reports.php

示例4: is_array

?>
</span>
						</div>
					</div>
				</div>
				<div class="step-3">
					<h2><?php 
echo Kohana::lang('ui_main.alerts_step3_select_catgories');
?>
</h2>
					<div class="holder">
						<div class="box">
							<div class="report_category" id="categories">
							<?php 
$selected_categories = (!empty($form['alert_category']) and is_array($form['alert_category'])) ? $selected_categories = $form['alert_category'] : array();
echo category::tree($categories, $selected_categories, 'alert_category', 2, TRUE);
?>
							</div>
						</div>
					</div>
				</div>
				<input id="btn-send-alerts" class="btn_submit" type="submit" value="<?php 
echo Kohana::lang('ui_main.alerts_btn_send');
?>
" />
				<BR /><BR />
				<a href="<?php 
echo url::site() . "alerts/confirm";
?>
"><?php 
echo Kohana::lang('ui_main.alert_confirm_previous');
開發者ID:rabbit09,項目名稱:Taarifa_Web,代碼行數:31,代碼來源:alerts.php

示例5: is_array

)</small>
						<?php 
}
?>
					</div>
					<div style="clear:both; display:block;" id="incident_date_time"></div>
				</div>
				<div class="report_row">
					<h4><?php 
echo Kohana::lang('ui_main.reports_categories');
?>
 <span class="required">*</span></h4>
					<div class="report_category" id="categories">
					<?php 
$selected_categories = (!empty($form['incident_category']) and is_array($form['incident_category'])) ? $selected_categories = $form['incident_category'] : array();
echo category::tree($categories, TRUE, $selected_categories, 'incident_category', 2);
?>
					</div>
				</div>


				<?php 
// Action::report_form - Runs right after the report categories
Event::run('ushahidi_action.report_form');
?>

				<?php 
echo $custom_forms;
?>

				<div class="report_optional">
開發者ID:nanangsyaifudin,項目名稱:HAC-2012,代碼行數:31,代碼來源:submit.php


注:本文中的category::tree方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。