function skinr_skin_get_sids in Skinr 8.2
Same name and namespace in other branches
- 7.2 skinr.module \skinr_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.
1 call to skinr_skin_get_sids()
- LibraryListForm::submitForm in skinr_ui/
src/ Form/ LibraryListForm.php - Form submission handler.
File
- ./
skinr.module, line 1035 - Handles core Skinr functionality.
Code
function skinr_skin_get_sids($filter_by = array()) {
$query = \Drupal::entityQuery('skin');
if (isset($filter_by['theme'])) {
$query
->condition('theme', $filter_by['theme']);
}
if (isset($filter_by['element_type'])) {
$query
->condition('element_type', $filter_by['element_type']);
}
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();
}