class WebformObjectHelper in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Utility/WebformObjectHelper.php \Drupal\webform\Utility\WebformObjectHelper
Provides helper to operate on objects.
Hierarchy
- class \Drupal\webform\Utility\WebformObjectHelper
Expanded class hierarchy of WebformObjectHelper
2 files declare their use of WebformObjectHelper
- WebformCliService.php in src/
Commands/ WebformCliService.php - WebformObjectHelperTest.php in tests/
src/ Unit/ Utility/ WebformObjectHelperTest.php
File
- src/
Utility/ WebformObjectHelper.php, line 8
Namespace
Drupal\webform\UtilityView source
class WebformObjectHelper {
/**
* Sort object by properties.
*
* @param object $object
* An object.
*
* @return object
* Object sorted by properties.
*/
public static function sortByProperty($object) {
$array = (array) $object;
ksort($array);
return (object) $array;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WebformObjectHelper:: |
public static | function | Sort object by properties. |