function skinr_context_group_get_sids in Skinr 8.2
Same name and namespace in other branches
- 7.2 skinr_context/skinr_context.module \skinr_context_group_get_sids()
Get skin settings IDs for grouped skin settings.
Parameters
$filter_by: An associative array whose keys are:
- theme: (optional) The theme.
- module: (optional) The module.
- element: (optional) The element ID.
- gid: (optional) The group ID.
- skin: (optional) The skin name.
- status: (optional) Boolean indicating whether or not this skin configuration is enabled.
Return value
An array of skin settings IDs.
4 calls to skinr_context_group_get_sids()
- skinr_context_group_delete_multiple in skinr_context/
skinr_context.module - Delete multiple skin settings group objects.
- skinr_context_group_save in skinr_context/
skinr_context.module - Save a skin group object.
- skinr_context_ui_form_get_defaults in skinr_context/
skinr_context_ui.edit.inc - Helper function to get the default values for the skinr edit form.
- skinr_context_ui_form_submit in skinr_context/
skinr_context_ui.module - Form submission handler for skinr_context_form_alter().
File
- skinr_context/
skinr_context.module, line 526 - Provides Skinr integration with Context.
Code
function skinr_context_group_get_sids($filter_by = array()) {
$query = db_select('skinr_skins', 's');
$query
->join('skinr_group_skins', 'gs', 's.sid = gs.sid');
$query
->fields('s', array(
'sid',
));
if (isset($filter_by['theme'])) {
$query
->condition('s.theme', $filter_by['theme']);
}
if (isset($filter_by['module'])) {
$query
->condition('s.module', $filter_by['module']);
}
if (isset($filter_by['element'])) {
$query
->condition('s.element', $filter_by['element']);
}
if (isset($filter_by['gid'])) {
$query
->condition('gs.gid', $filter_by['gid']);
}
if (isset($filter_by['skin'])) {
$query
->condition('s.skin', $filter_by['skin']);
}
if (isset($filter_by['status'])) {
$query
->condition('s.status', $filter_by['status']);
}
return $query
->execute()
->fetchCol();
}