getOnDeleteOptions() public static method

public static getOnDeleteOptions ( ) : array
return array
示例#1
0
文件: _form.php 项目: skeeks-cms/cms
            <?php 
echo $form->fieldSelect($model, 'parent_content_id', \skeeks\cms\models\CmsContent::getDataForSelect(true, function (\yii\db\ActiveQuery $activeQuery) use($model) {
    if (!$model->isNewRecord) {
        $activeQuery->andWhere(['!=', 'id', $model->id]);
    }
}), ['allowDeselect' => true]);
?>
        </div>
        <div class="col-md-3">
            <?php 
echo $form->fieldRadioListBoolean($model, 'parent_content_is_required');
?>
        </div>
        <div class="col-md-3">
            <?php 
echo $form->fieldSelect($model, 'parent_content_on_delete', \skeeks\cms\models\CmsContent::getOnDeleteOptions());
?>
        </div>
    </div>



    <? if ($model->childrenContents) : ?>
        <p><b><?php 
echo \Yii::t('skeeks/cms', 'Children content');
?>
</b></p>
        <? foreach ($model->childrenContents as $contentChildren) : ?>
            <p><?php 
echo Html::a($contentChildren->name, \skeeks\cms\helpers\UrlHelper::construct(['/cms/admin-cms-content/update', 'pk' => $contentChildren->id])->enableAdmin()->toString());
?>