kartik\builder\TabularForm::checkValidSetting PHP Method

checkValidSetting() protected static method

Checks if a setting is of valid type and throws exception if not.
protected static checkValidSetting ( string $attr, array $settings, string $key, string $type )
$attr string the attribute to check
$settings array the attribute settings
$key string the model key
$type string the attribute input type
    protected static function checkValidSetting($attr, $settings, $key, $type)
    {
        if (!isset($settings[$key])) {
            return;
        }
        $validateFunc = "is_{$type}";
        if (!$validateFunc($settings[$key])) {
            throw new InvalidConfigException("You must set the 'settings[\"{$key}\"]' property for  '{$attr}' attribute as a valid {$type} " . "(no Closure method is supported).");
        }
    }