You are here

function _bootstrap_library_object_to_array in Bootstrap Library 8

Converts an object to an array.

Return value

array Object converted.

2 calls to _bootstrap_library_object_to_array()
BootstrapLibrarySettingsForm::buildForm in src/BootstrapLibrarySettingsForm.php
Form constructor.
bootstrap_library_library_info_build in ./bootstrap_library.module
Implements hook_library_info_build().

File

./bootstrap_library.module, line 157
Primarily Drupal hooks.

Code

function _bootstrap_library_object_to_array($data) {
  if (is_array($data) || is_object($data)) {
    $result = array();
    foreach ($data as $key => $value) {
      $result[$key] = _bootstrap_library_object_to_array($value);
    }
    return $result;
  }
  return $data;
}