public static function WebformArrayHelper::getNextKey in Webform 8.5
Same name and namespace in other branches
- 6.x src/Utility/WebformArrayHelper.php \Drupal\webform\Utility\WebformArrayHelper::getNextKey()
Get the next key in an array.
Parameters
array $array: An array.
string $key: A key.
Return value
string|null The next key in an array or NULL if there is no next key.
2 calls to WebformArrayHelper::getNextKey()
- WebformArrayHelperTest::testGetKey in tests/
src/ Unit/ Utility/ WebformArrayHelperTest.php - Tests navigating an associative array's keys.
- WebformSubmissionForm::getNextPage in src/
WebformSubmissionForm.php - Get next page's key.
File
- src/
Utility/ WebformArrayHelper.php, line 127
Class
- WebformArrayHelper
- Provides helper to operate on arrays.
Namespace
Drupal\webform\UtilityCode
public static function getNextKey(array $array, $key) {
return self::getKey($array, $key, 'next');
}