public static function YamlFormArrayHelper::getFirstKey in YAML Form 8
Get the first key in an array.
Parameters
array $array: An array.
Return value
string|null The first key in an array.
2 calls to YamlFormArrayHelper::getFirstKey()
- YamlFormSubmissionForm::getCurrentPage in src/
YamlFormSubmissionForm.php - Get the current page's key.
- YamlFormSubmissionForm::getFirstPage in src/
YamlFormSubmissionForm.php - Get first page's key.
File
- src/
Utility/ YamlFormArrayHelper.php, line 97
Class
- YamlFormArrayHelper
- Provides helper to operate on arrays.
Namespace
Drupal\yamlform\UtilityCode
public static function getFirstKey(array $array) {
$keys = array_keys($array);
return reset($keys);
}