コード例 #1
0
ファイル: _form_fieldset.php プロジェクト: Chipusy/lkbroker
    ?>
		<?php 
    include_partial('category/form_field', array('name' => $name, 'attributes' => $field->getConfig('attributes', array()), 'label' => $field->getConfig('label'), 'help' => $field->getConfig('help'), 'form' => $form, 'field' => $field, 'class' => 'sf_admin_form_row sf_admin_' . strtolower($field->getType()) . ' sf_admin_form_field_' . $name));
    ?>
	<?php 
}
?>
	
	<div class="sf_admin_form_row sf_admin_text sf_admin_form_field_parent_id">
		<div>
			<label for="category_parent_id">Родительская категория</label>
			<div class="content">
				<select name="category[parent_id]" id="category_parent_id" size="1" onChange="add_preference_control()">
					<option value="0"> нет родительской категории</option>
					<?php 
foreach (CategoryPeer::getAllParent() as $key => $parent) {
    ?>
						<?php 
    if ($Category->getId() != $parent->getId()) {
        ?>
							<option value="<?php 
        echo $parent->getId();
        ?>
" <?php 
        echo $Category->getParentId() == $parent->getId() ? 'selected' : '';
        ?>
> &mdash; <?php 
        echo $parent->getHeader();
        ?>
</option>
						<?php 
コード例 #2
0
ファイル: actions.class.php プロジェクト: Chipusy/lkbroker
 public function executeIndex(sfWebRequest $request)
 {
     $this->parentCategory = CategoryPeer::getAllParent();
     $this->subCategory = CategoryPeer::getAllSub();
 }