Skip to main content

GravityKit\GravityView\Elementor\Controls\ControlsManager

Manages Elementor controls for the GravityView widget.

Source: src/Controls/ControlsManager.php:16

Details​

  • Kind: class
  • Namespace: GravityKit\GravityView\Elementor\Controls

Methods​

MethodDescription
get_view_setting_keys()Returns the keys of the View settings the widget's panel offers, in GravityView's order.
__construct()Initializes the control manager.
register_controls()Registers all controls for the widget.

Method Reference​

get_view_setting_keys()​

public static function get_view_setting_keys( ?array $defaults=null ): array

Returns the keys of the View settings the widget's panel offers, in GravityView's order.

The renderer passes only these keys to the shortcode. Elementor saves whatever settings an editor sends, so a key the panel does not offer, such as user_edit, would otherwise override the View's own setting for every visitor. Keys the installed GravityView does not define are left out.

Parameters​

NameTypeDefaultDescription
$defaultsarray | nullnullOutput of View_Settings::defaults( true ). Pass the array the caller reads settings from, so every returned key is in it.

Returns​

  • string[]

Since: 1.2.0

Source: src/Controls/ControlsManager.php:115

__construct()​

public function __construct( $widget, $layout_manager )

Initializes the control manager.

Parameters​

NameTypeDefaultDescription
$widgetViewWidgetWidget instance.
$layout_managerLayoutManagerLayout manager instance.

Since: 1.0.0

Source: src/Controls/ControlsManager.php:129

register_controls()​

public function register_controls()

Registers all controls for the widget.

Returns​

  • void

Since: 1.0.0

Source: src/Controls/ControlsManager.php:142