GravityKit\GravityView\Settings\ViewSettings
The View Settings class.
Since:
2.03.0.0(Migrated to GravityKit\GravityView\Settings namespace.)
Source: src/Settings/ViewSettings.php:20
Details
- Kind:
class - Namespace:
GravityKit\GravityView\Settings - Extends:
Settings
Methods
| Method | Description |
|---|---|
with_defaults() | Retrieve an instance of the settings with default values. |
defaults() | Retrieve the default View settings. |
Method Reference
with_defaults()
public static function with_defaults( $detailed=false )
Retrieve an instance of the settings with default values.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$detailed | bool | false | Whether to return detailed setting meta information or just the value. |
Returns
\GV\View_Settings
Since: 2.0
Source: src/Settings/ViewSettings.php:31
defaults()
public static function defaults( $detailed=false, $group=null )
Retrieve the default View settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
$detailed | bool | false | Whether to return detailed setting meta information or just the value. |
$group | string | null | The field group the setting is associated with. Default: "default" |
$label | string | Setting label shown in admin | |
$type | string | Gravity Forms field type | |
$value | mixed | The default value for the setting | |
$tooltip | string | Tooltip displayed for the setting | |
$show_in_shortcode | boolean | Whether to show the setting in the shortcode configuration modal | |
$options | array | Array of values to use when generating select, multiselect, radio, or checkboxes fields | |
$full_width | boolean | True: Display the input and label together when rendering. False: Display label and input in separate columns when rendering. |
Returns
array— The default settings along with their values.
Since: 2.0
Source: src/Settings/ViewSettings.php:56