当前位置: 首页>>代码示例>>PHP>>正文


PHP Category::getHierarchy方法代码示例

本文整理汇总了PHP中app\models\Category::getHierarchy方法的典型用法代码示例。如果您正苦于以下问题:PHP Category::getHierarchy方法的具体用法?PHP Category::getHierarchy怎么用?PHP Category::getHierarchy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\models\Category的用法示例。


在下文中一共展示了Category::getHierarchy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

    <div class="tab-pane active" id="home">
    <p>
    <?php 
echo $form->field($model, 'type_id')->radioList(['1' => Yii::t('app', 'Revenue'), '2' => Yii::t('app', 'Expense')], ['itemOptions' => ['class' => 'radio-inline', 'labelOptions' => array('style' => 'padding:4px;')]])->label('');
?>

    <?php 
echo DatePicker::widget(['model' => $model, 'form' => $form, 'attribute' => 'date', 'type' => DatePicker::TYPE_INPUT, 'size' => 'sm', 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'format' => 'yyyy-mm-dd']]);
?>
    
    <?php 
echo $form->field($model, 'value')->widget(MaskMoney::classname(), ['pluginOptions' => ['affixesStay' => true, 'precision' => 2, 'allowZero' => true, 'allowNegative' => true]]);
?>

    <?php 
echo $form->field($model, 'category_id', ['inputOptions' => ['class' => 'selectpicker ']])->dropDownList(app\models\Category::getHierarchy(), ['prompt' => Yii::t('app', 'Select'), 'class' => 'form-control required']);
?>

    <?php 
echo $form->field($model, 'description')->textInput(['maxlength' => 100]);
?>

    </div>
    <div class="tab-pane" id="profile">

    <?php 
echo $form->field($model, 'is_pending')->checkbox(['label' => '', 'labelOptions' => array('class' => 'col-lg-2 control-label')])->label(Yii::t('app', 'Pending'));
?>

    <?php 
echo $form->field($model, 'file')->fileInput();
开发者ID:gugoan,项目名称:economizzer,代码行数:31,代码来源:_form.php

示例2:

    <div class="row">
        <div class="col-sm-11">
        <?php 
echo '<label class="control-label">' . Yii::t('app', 'To') . '</label>';
echo DatePicker::widget(['model' => $model, 'attribute' => 'end_date', 'type' => DatePicker::TYPE_COMPONENT_PREPEND, 'options' => ['placeholder' => ''], 'pluginOptions' => ['autoclose' => true, 'todayHighlight' => true, 'format' => 'yyyy-mm-dd']]);
?>
        </div>
    </div><p>

    <?php 
echo $form->field($model, 'type_id')->dropDownList(['1' => Yii::t('app', 'Revenue'), '2' => Yii::t('app', 'Expense')], ['prompt' => Yii::t('app', 'All')]);
//->dropDownList(ArrayHelper::map(Type::find()->all(), 'id_type', 'desc_type'),['prompt'=>Yii::t('app', 'All')])
?>

    <?php 
echo $form->field($model, 'category_id')->dropDownList(Category::getHierarchy(), ['prompt' => Yii::t('app', 'All')]);
?>

    <?php 
echo $form->field($model, 'value');
?>

    <?php 
echo $form->field($model, 'description');
?>

    <?php 
echo $form->field($model, 'is_pending')->checkbox();
?>

    <div class="form-group">
开发者ID:gugoan,项目名称:economizzer,代码行数:31,代码来源:_search.php


注:本文中的app\models\Category::getHierarchy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。