You are here

protected function ImageStyleConfigurationHandler::styleSanitize in Configuration Management 7.3

Remove unnecessary keys for export.

1 call to ImageStyleConfigurationHandler::styleSanitize()
ImageStyleConfigurationHandler::loadFromDatabase in src/Handlers/ImageStyleConfigurationHandler.php
Loads the configuration from the database.

File

src/Handlers/ImageStyleConfigurationHandler.php, line 129

Class

ImageStyleConfigurationHandler

Namespace

Configuration\Handlers

Code

protected function styleSanitize(&$style, $child = FALSE) {
  $omit = $child ? array(
    'isid',
    'ieid',
  ) : array(
    'isid',
    'ieid',
    'module',
  );
  if (is_array($style)) {
    foreach ($style as $k => $v) {
      if (in_array($k, $omit, TRUE)) {
        unset($style[$k]);
      }
      elseif (is_array($v)) {
        $this
          ->styleSanitize($style[$k], TRUE);
      }
    }
  }
}