Skip to content

Instantly share code, notes, and snippets.

@damiankloip
Created August 26, 2012 13:09
Show Gist options
  • Save damiankloip/3479044 to your computer and use it in GitHub Desktop.
Save damiankloip/3479044 to your computer and use it in GitHub Desktop.
<?php
// TODO: This temp measure will be removed once we have a better way or
// separation of storage and the executed view.
$config_properties = array (
'disabled',
'api_version',
'name',
'description',
'tag',
'base_table',
'human_name',
'core',
'display',
);
foreach ($config_properties as $property) {
if ($property == 'display') {
$displays = array();
foreach ($entity->display as $key => $display) {
$displays[$key] = $display->display_options;
}
$config->set('display', $displays);
}
else {
$config->set($property, $entity->$property);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment