function picture_get_mapping_options in Picture 7
Same name and namespace in other branches
- 7.2 picture.module \picture_get_mapping_options()
Returns a list of picture mappings for use in a select list.
4 calls to picture_get_mapping_options()
- flexslider_picture_form_ctools_export_ui_edit_item_form_alter in flexslider_picture/
flexslider_picture.module - Implements hook_form_FORM_ID_alter().
- picture_ckeditor_settings in ./
picture.admin.inc - Chooses which picture groups are available in the CKEditor image dialog.
- picture_field_formatter_settings_form in ./
picture.module - Implements hook_field_formatter_settings_form().
- picture_page_build in ./
picture.module - Implements hook_page_build().
File
- ./
picture.module, line 560 - Picture formatter.
Code
function picture_get_mapping_options() {
$picture_mapping_options = array();
$picture_mappings = picture_mapping_load_all();
if ($picture_mappings && !empty($picture_mappings)) {
foreach ($picture_mappings as $machine_name => $picture_mapping) {
$breakpoint_group = breakpoints_breakpoint_group_load($picture_mapping->breakpoint_group);
if ($breakpoint_group) {
$picture_mapping_options[$machine_name] = $breakpoint_group->name;
}
}
}
return $picture_mapping_options;
}