GCALENDAR_ADDATTENDEE::load_options()


Source Source

File: src/integrations/google-calendar/actions/gcalendar-addattendee.php

	public function load_options() {

		$helper = Automator()->helpers->recipe->google_calendar->options;

		$options = array(
			'options_group' => array(
				$this->get_action_meta() => array(
					array(
						'option_code'           => $this->get_formatted_code( 'calendar_id' ),
						'label'                 => esc_attr__( 'Calendar', 'uncanny-automator' ),
						'input_type'            => 'select',
						'required'              => true,
						'supports_token'        => true,
						'supports_custom_value' => true,
						'options'               => $helper->get_calendar_options(),
						'is_ajax'               => true,
						'endpoint'              => 'automator_google_calendar_list_events',
						'fill_values_in'        => $this->get_formatted_code( 'event_id' ),
						'options_show_id'       => false,
					),
					array(
						'option_code'           => $this->get_formatted_code( 'event_id' ),
						'label'                 => esc_attr__( 'Event', 'uncanny-automator' ),
						'input_type'            => 'select',
						'required'              => true,
						'supports_token'        => true,
						'supports_custom_value' => true,
						'options_show_id'       => false,
					),
					array(
						'option_code'           => $this->get_action_meta(),
						'label'                 => esc_attr__( 'Attendee email', 'uncanny-automator' ),
						'input_type'            => 'email',
						'required'              => true,
						'supports_custom_value' => true,
						'supports_token'        => true,
					),
				),
			),
		);

		$options = Automator()->utilities->keep_order_of_options( $options );

		return $options;
	}