You are here

function block_class_block_presave in Block Class 8

Implements hook_ENTITY_TYPE_presave().

File

./block_class.module, line 44
Adding classes to blocks.

Code

function block_class_block_presave(BlockInterface $entity) {
  if (empty($entity
    ->getThirdPartySetting('block_class', 'classes'))) {
    $entity
      ->unsetThirdPartySetting('block_class', 'classes');
  }
}