PHP code example of qingbing / pf-tools-form-setting
1. Go to this page and download the library: Download qingbing/pf-tools-form-setting library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
qingbing / pf-tools-form-setting example snippets
// 获取配置组件
$model = FormSetting::cache('mail_config');
// 获取所有配置的值
var_dump($model->getAttributes());
// 获取所有某个配置的值
var_dump($model->smtp_port);
$this->widget('\Widgets\FormGenerator', [
'model' => FormSetting::cache('mail_config'), // 获取收集选项,并赋值给FormGenerator
]);