You are here

public function ModalPageService::prepareClass in Modal 4.0.x

Same name and namespace in other branches
  1. 4.1.x src/Service/ModalPageService.php \Drupal\modal_page\Service\ModalPageService::prepareClass()

Prepare class.

File

src/Service/ModalPageService.php, line 573

Class

ModalPageService
Modal Page Service Class.

Namespace

Drupal\modal_page\Service

Code

public function prepareClass($class) {
  if (empty($class)) {
    return FALSE;
  }
  $class = strtolower($class);
  $class = str_replace(',', ' ', $class);
  $class = str_replace('  ', ' ', $class);
  return $class;
}