function _breakpoint_delete_breakpoint_groups in Breakpoints 8
Remove breakpoint groups from all disabled themes or uninstalled modules.
Parameters
array $group_id: Identifier of the breakpoint group.
string $sourceType: Either Breakpoint::SOURCE_TYPE_THEME or Breakpoint::SOURCE_TYPE_MODULE.
1 call to _breakpoint_delete_breakpoint_groups()
- _breakpoint_delete_breakpoints in ./
breakpoint.module - Remove breakpoints from all disabled themes or uninstalled modules. The source type has to match the original source type, otherwise the group will not be deleted.
File
- ./
breakpoint.module, line 192 - Manage breakpoints and breakpoint groups for responsive designs.
Code
function _breakpoint_delete_breakpoint_groups($group_id, $source_type) {
$breakpoint_groups = entity_load_multiple('breakpoint_group');
foreach ($breakpoint_groups as $breakpoint_group) {
if ($breakpoint_group->sourceType == $source_type && $breakpoint_group->source == $group_id) {
$breakpoint_group
->delete();
}
}
}