andatech-hrm/yii2-app-setting

Yii 2 for Setting web

dev-master 2017-09-10 15:41 UTC

This package is not auto-updated.

Last update: 2024-11-09 20:45:21 UTC


README

ระบบการตั้งค่าเว็บ

Set dataprovidor page size example

$searchModel = new PersonSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$dataProvider->pagination->pageSize = Yii::$app->params['app-settings']['reading']['pagesize']; //See this line

Use widget settings

use andahrm\setting\models\WidgetSettings;
//example
echo $form->field($model, 'race_id')->widget(Select2::classname(), WidgetSettings::Select2([
    'data' => ArrayHelper::map(Race::find()->all(), 'id', 'title')
]);