You are here

function breakpoint_labels in Breakpoints 8

Load all breakpoints as select options.

Return value

array An array containing breakpoints indexed by their ids.

File

./breakpoint.module, line 391
Manage breakpoints and breakpoint groups for responsive designs.

Code

function breakpoint_labels() {
  $options = array();
  $breakpoints = entity_load_multiple('breakpoint');
  foreach ($breakpoints as $breakpoint) {
    $options[$breakpoint
      ->id()] = $breakpoint
      ->label() . ' (' . $breakpoint->source . ' - ' . $breakpoint->sourceType . ') [' . $breakpoint->mediaQuery . ']';
  }
  return $options;
}