public static function YamlFormArrayHelper::getLastKey in YAML Form 8
Get the last key in an array.
Parameters
array $array: An array.
Return value
string|null The last key in an array.
1 call to YamlFormArrayHelper::getLastKey()
- YamlFormSubmissionForm::getLastPage in src/
YamlFormSubmissionForm.php - Get last page's key.
File
- src/
Utility/ YamlFormArrayHelper.php, line 111
Class
- YamlFormArrayHelper
- Provides helper to operate on arrays.
Namespace
Drupal\yamlform\UtilityCode
public static function getLastKey(array $array) {
$keys = array_keys($array);
return end($keys);
}