public function GridStackBase::getJson in GridStack 8.2
Returns the GridStack json suitable for HTML data-attribute.
Parameters
string $group: The option group can be settings or grids.
Return value
string The output of the GridStack json.
Overrides GridStackBaseInterface::getJson
1 call to GridStackBase::getJson()
- GridStack::getColumns in src/
Entity/ GridStack.php - Returns the available breakpoint columns.
File
- src/
Entity/ GridStackBase.php, line 127
Class
- GridStackBase
- Defines the base class for GridStack configuration entity.
Namespace
Drupal\gridstack\EntityCode
public function getJson($group = '') {
$default = self::load('default');
if ($group) {
$defaults = isset($default->json[$group]) ? $default->json[$group] : '';
return isset($this->json[$group]) ? $this->json[$group] : $defaults;
}
return $this->json;
}