You are here

function rlayout_breakpoint_find_grid in Layout 8

Find the (first) grid matching this breakpoint.

1 call to rlayout_breakpoint_find_grid()
rlayout_breakpoints_load_all in ./rlayout.module
Helper function to return processed breakpoint information for layouts.

File

./rlayout.module, line 166
Responsive layout builder tool for Panels.

Code

function rlayout_breakpoint_find_grid($breakpoint_key) {
  $all_grids = entity_load_multiple('grid');
  foreach ($all_grids as $grid) {
    if (!empty($grid->options['breakpoints']) && in_array($breakpoint_key, $grid->options['breakpoints'])) {
      return $grid
        ->id();
    }
  }
  return FALSE;
}