You are here

function domain_theme_prepare_export in Domain Access 7.3

Prepares theme data as an export array.

Parameters

$machine_name: The source domain machine name.

Return value

An array of theme records.

1 call to domain_theme_prepare_export()
domain_theme_features_export_render in domain_theme/domain_theme.features.inc
Implements hook_features_export_render().

File

domain_theme/domain_theme.features.inc, line 60
Features support for Domain Theme.

Code

function domain_theme_prepare_export($machine_name) {
  $domain_id = domain_load_domain_id($machine_name);
  $data = db_query("SELECT domain_id, theme, settings, status, filepath FROM {domain_theme} WHERE domain_id = :domain_id", array(
    ':domain_id' => $domain_id,
  ))
    ->fetchAll();
  $theme = array();
  $machine_name = domain_load_machine_name($domain_id);
  foreach ($data as $item) {
    $theme[$item->theme] = array(
      'theme' => $item->theme,
      'settings' => domain_unserialize($item->settings),
      'status' => $item->status,
      'filepath' => $item->filepath,
    );
  }
  return $theme;
}