You are here

public function DynamicLayoutSettings::getColumnPrefix in Dynamic Layouts 8

Get the column prefix.

Overrides DynamicLayoutSettingsInterface::getColumnPrefix

File

src/Entity/DynamicLayoutSettings.php, line 89

Class

DynamicLayoutSettings
Defines the DynamicLayoutSettings entity.

Namespace

Drupal\dynamic_layouts\Entity

Code

public function getColumnPrefix() {
  $settings = unserialize($this->settings);
  $column_prefix = NULL;

  // Check for grid column prefix from settings.
  if (isset($settings[Constants::COLUMN_PREFIX])) {
    $column_prefix = $settings[Constants::COLUMN_PREFIX];
  }

  // Default column prefix for bootstrap.
  if ($this
    ->getFrontendLibrary() == Constants::BOOTSTRAP) {
    $column_prefix = 'col';
  }
  return $column_prefix;
}