You are here

public static function YamlFormArrayHelper::getPreviousKey in YAML Form 8

Get the prev(ious) key in an array.

Parameters

array $array: An array.

string $key: A key.

Return value

string|null The prev(ious) key in an array or NULL is there is no previous key.

1 call to YamlFormArrayHelper::getPreviousKey()
YamlFormSubmissionForm::getPreviousPage in src/YamlFormSubmissionForm.php
Get previous page's key.

File

src/Utility/YamlFormArrayHelper.php, line 142

Class

YamlFormArrayHelper
Provides helper to operate on arrays.

Namespace

Drupal\yamlform\Utility

Code

public static function getPreviousKey(array $array, $key) {
  return self::getKey($array, $key, 'prev');
}