Skip to main content

GravityKit\GravityCalendar\Overview\Calendars_Overview

Source: includes/overview/class-calendars-overview.php:17

Details​

  • Kind: class
  • Namespace: GravityKit\GravityCalendar\Overview

Methods​

MethodDescription
__construct()Constructor.
add_gform_admin_body_class()Adds Gravity Forms' own admin body class to the calendars overview screen.
get_instance()Returns class instance.
disable_notices()Disables all notices.
add_gk_submenu()Adds an "All Calendars" submenu to the GravityKit menu above "Grant Support Access".
calendars_list()Outputs the overview table.
is_calendars_overview_page()Checks if the current page is the plugin settings page.
is_overview_page_request()Whether the current request addresses the calendars overview page.
add_styles()Adds styling for the table elements.
add_scripts()Adds scripts that handles the form actions.

Method Reference​

__construct()​

public function __construct()

Constructor.

Since: 2.9.0

Source: includes/overview/class-calendars-overview.php:34

add_gform_admin_body_class()​

public function add_gform_admin_body_class( $classes )

Adds Gravity Forms' own admin body class to the calendars overview screen.

This screen renders Gravity Forms' feed list table, and the styles for that table's controls are scoped to a .gform-admin ancestor — .gform-admin .gform-status-indicator, for one, is what draws the Active/Inactive toggle. Gravity Forms only adds the class on its own screens, so without this the toggle falls back to an unstyled browser button.

Parameters​

NameTypeDefaultDescription
$classesstringSpace-separated list of admin body classes.

Returns​

  • string

Since: 2.22.0

Source: includes/overview/class-calendars-overview.php:56

get_instance()​

public static function get_instance(): self

Returns class instance.

Returns​

  • Calendars_Overview

Since: 2.9.0

Source: includes/overview/class-calendars-overview.php:71

disable_notices()​

public function disable_notices(): void

Disables all notices.

Returns​

  • void

Since: 2.9.0

Source: includes/overview/class-calendars-overview.php:86

add_gk_submenu()​

public function add_gk_submenu( $submenus )

Adds an "All Calendars" submenu to the GravityKit menu above "Grant Support Access".

Parameters​

NameTypeDefaultDescription
$submenusarrayList of submenus.

Returns​

  • array

Since: 2.9.0

Source: includes/overview/class-calendars-overview.php:119

calendars_list()​

public function calendars_list(): void

Outputs the overview table.

Returns​

  • void

Since: 2.9.0

Source: includes/overview/class-calendars-overview.php:156

is_calendars_overview_page()​

public function is_calendars_overview_page(): bool

Checks if the current page is the plugin settings page.

Returns​

  • bool

Since: 2.9.0

Source: includes/overview/class-calendars-overview.php:238

is_overview_page_request()​

public static function is_overview_page_request(): bool

Whether the current request addresses the calendars overview page.

Callers that hook this class's own admin output want \self::is_calendars_overview_page(), which also waits for Foundation. This one answers only "is this that page", for callers running before Foundation has initialized or outside it entirely.

Returns​

  • bool

Since: 2.22.0

Source: includes/overview/class-calendars-overview.php:257

add_styles()​

public function add_styles( $styles )

Adds styling for the table elements.

Parameters​

NameTypeDefaultDescription
$stylesarrayInline styles to be added to the page.

Returns​

  • array

Since: 2.9.0

Source: includes/overview/class-calendars-overview.php:285

add_scripts()​

public function add_scripts( $scripts )

Adds scripts that handles the form actions.

Parameters​

NameTypeDefaultDescription
$scriptsarrayScripts array.

Returns​

  • array

Since: 2.9.0

Source: includes/overview/class-calendars-overview.php:398