protected function GridStack::breakpointToArray in GridStack 8.2
Converts breakpoint items from stored JSON into array.
1 call to GridStack::breakpointToArray()
- GridStack::breakpointsToArray in src/
Entity/ GridStack.php - Converts the entire breakpoint items from stored JSON into array.
File
- src/
Entity/ GridStack.php, line 128
Class
- GridStack
- Defines the GridStack configuration entity.
Namespace
Drupal\gridstack\EntityCode
protected function breakpointToArray(array $breakpoint) {
$build = [];
foreach ([
'column',
'width',
'grids',
'nested',
] as $id) {
if (isset($breakpoint[$id])) {
$build[$id] = in_array($id, [
'column',
'width',
]) ? (int) $breakpoint[$id] : Json::decode($breakpoint[$id]);
}
}
return $build;
}