API_Action::get_js_data( awsmug\Torro_Forms\DB_Objects\Forms\Form|null $form = null )

Returns API action data to pass to the script file.

Description

See also

Parameters

$form

(awsmug\Torro_Forms\DB_Objects\Forms\Form|null) (Optional) Form for which to generate the data.

Default value: null

Return

(array) Data to pass to JavaScript.

Source

File: src/modules/actions/api-action.php

	protected final function get_js_data( $form = null ) {
		return array(
			'actionSlug'   => $this->slug,
			'mappingsName' => $this->module->manager()->get_prefix() . $this->slug . '_mappings',
			'metaName'     => $this->get_meta_identifier(),
			'mapFields'    => $this->get_element_map_fields(),
			'enabled'      => $form ? $this->enabled( $form ) : false,
			'mappings'     => $form ? $this->get_mappings( $form->id ) : array(),
		);
	}

Changelog

Changelog
Version Description
1.0.0 Introduced.