public function DynamicLayout::getColumnClasses in Dynamic Layouts 8
Get the layout column classes, comma separated.
Parameters
int $row_id: The row number we need to get the column classes from.
int $column_id: The column id we need to get.
Overrides DynamicLayoutInterface::getColumnClasses
File
- src/
Entity/ DynamicLayout.php, line 299
Class
- DynamicLayout
- Defines the DynamicLayout entity.
Namespace
Drupal\dynamic_layouts\EntityCode
public function getColumnClasses($row_id, $column_id) {
$row = $this
->getRowById($row_id);
$column_classes = '';
$column = $this
->getColumnById($row, $column_id);
// Guarding.
if (!isset($column[Constants::CUSTOM_COLUMN_CLASSES])) {
return $column_classes;
}
if (!is_array($column[Constants::CUSTOM_COLUMN_CLASSES])) {
return $column_classes;
}
return implode(', ', $column[Constants::CUSTOM_COLUMN_CLASSES]);
}