protected ConfigBase::castSafeStrings($data)
Casts any objects that implement MarkupInterface to string.
mixed $data: The configuration data.
mixed The data with any safe strings cast to string.
protected function castSafeStrings($data) { if ($data instanceof MarkupInterface) { $data = (string) $data; } elseif (is_array($data)) { array_walk_recursive($data, function(&$value) { if ($value instanceof MarkupInterface) { $value = (string) $value; } }); } return $data; }
© 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!lib!Drupal!Core!Config!ConfigBase.php/function/ConfigBase::castSafeStrings/8.1.x