Namespace: metadata

Drupal.quickedit. metadata

Per-field metadata that indicates whether in-place editing is allowed, which in-place editor should be used, etc.

Methods

staticDrupal.quickedit.metadata._prefixFieldID(fieldID){string}

Prefix the field id.

Name Type Description
fieldID string

The field id to prefix.

Returns:
Type Description
string A prefixed field id.

staticDrupal.quickedit.metadata._unprefixFieldID(fieldID){string}

Unprefix the field id.

Name Type Description
fieldID string

The field id to unprefix.

Returns:
Type Description
string An unprefixed field id.

staticDrupal.quickedit.metadata.add(fieldID, metadata)

Add metadata to a field id.

Name Type Description
fieldID string

The field ID to add data to.

metadata object

Metadata to add.

staticDrupal.quickedit.metadata.get(fieldID, key){object|*}

Get a key from a field id.

Name Type Description
fieldID string

The field ID to check.

key string optional

The key to check. If empty, will return all metadata.

Returns:
Type Description
object | * The value for the key, if defined. Otherwise will return all metadata for the specified field id.

staticDrupal.quickedit.metadata.has(fieldID){bool}

Check if a field exists in storage.

Name Type Description
fieldID string

The field id to check.

Returns:
Type Description
bool Whether it was found or not.

staticDrupal.quickedit.metadata.intersection(fieldIDs){Array}

Intersection calculation.

Name Type Description
fieldIDs Array

An array of field ids to compare to prefix field id.

Returns:
Type Description
Array The intersection found.