You are here

function fusion_apply_skin_get_sids in Fusion Accelerator 7.2

Same name and namespace in other branches
  1. 7 fusion_apply/fusion_apply.module \fusion_apply_skin_get_sids()

Get skin configuration IDs.

Parameters

$filter_by: An associative array whose keys are:

  • theme: (optional) The theme.
  • module: (optional) The module.
  • element: (optional) The element ID.
  • skin: (optional) The skin name.
  • status: (optional) Boolean indicating whether or not this skin configuration is enabled.

Return value

An array of skin configuration IDs.

6 calls to fusion_apply_skin_get_sids()
fusion_apply_data_handler in fusion_apply/fusion_apply.handlers.inc
Fusion Apply data handler.
fusion_apply_preprocess in fusion_apply/fusion_apply.module
Implements hook_preprocess().
fusion_apply_submit_handler in fusion_apply/fusion_apply.handlers.inc
Fusion Apply submit handler.
fusion_apply_ui_admin_skin_info_settings_submit in fusion_apply/fusion_apply_ui.admin.inc
Process fusion_apply_ui_admin_skin_info_settings() form submissions.
fusion_apply_ui_export_form in fusion_apply/fusion_apply_ui.admin.inc
Form builder for the skin settings export form.

... See full list

File

fusion_apply/fusion_apply.module, line 613
Handles core Fusion Apply functionality.

Code

function fusion_apply_skin_get_sids($filter_by = array()) {
  $query = db_select('fusion_apply_skins', 's')
    ->fields('s', array(
    'sid',
  ));
  if (isset($filter_by['theme'])) {
    $query
      ->condition('theme', $filter_by['theme']);
  }
  if (isset($filter_by['module'])) {
    $query
      ->condition('module', $filter_by['module']);
  }
  if (isset($filter_by['element'])) {
    $query
      ->condition('element', $filter_by['element']);
  }
  if (isset($filter_by['skin'])) {
    $query
      ->condition('skin', $filter_by['skin']);
  }
  if (isset($filter_by['status'])) {
    $query
      ->condition('status', $filter_by['status']);
  }
  return $query
    ->execute()
    ->fetchCol();
}