Example #1
0
 /**
  * Adds the 'fit-content' class name if the {@link FIT_CONTENT} attribute is truthy.
  */
 protected function alter_class_names(array $class_names)
 {
     $class_names = parent::alter_class_names($class_names);
     if ($this[self::FIT_CONTENT]) {
         $class_names['fit-content'] = true;
     }
     return $class_names;
 }
Example #2
0
 /**
  * Adds the `no-legend` class name if the group has no legend (the {@link LEGEND} attribute
  * is empty).
  *
  * @inheritdoc
  */
 protected function alter_class_names(array $class_names)
 {
     $name = $this['name'];
     return parent::alter_class_names($class_names) + ['group' => true, 'group-name' => $name ? 'group--' . normalize($name) : null, 'no-legend' => !$this[self::LEGEND]];
 }
Example #3
0
 protected function alter_class_names(array $class_names)
 {
     return parent::alter_class_names($class_names) + ['modal' => true, 'hide' => true, 'fade' => true];
 }
Example #4
0
 /**
  * Adds the following class names:
  *
  * - `listview`
  *
  * @inheritdoc
  */
 protected function alter_class_names(array $class_names)
 {
     return parent::alter_class_names($class_names) + ['listview' => true];
 }