getHierarchy() public static method

public static getHierarchy ( )
Example #1
0
    <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();
Example #2
0
    <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">