_drupal_rewrite_settings_dump($variable, $variable_name)
Helper for drupal_rewrite_settings().
Dump the relevant value properties.
array|object $variable: The container for variable values.
string $variable_name: Name of variable.
string A string containing valid PHP code of the variable suitable for placing into settings.php.
function _drupal_rewrite_settings_dump($variable, $variable_name) { $return = ''; if (is_object($variable)) { if (!empty($variable->required)) { $return .= _drupal_rewrite_settings_dump_one($variable, "$variable_name = ", "\n"); } } else { foreach ($variable as $k => $v) { $return .= _drupal_rewrite_settings_dump($v, $variable_name . "['" . $k . "']"); } } return $return; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!install.inc/function/_drupal_rewrite_settings_dump/8.1.x