Ejemplo n.º 1
0
 /**
  * Adds the `alert-error`, `alert-info` and `alert-success` class names according to the
  * {@link CONTEXT} attribute.
  *
  * Adds the `alert-block` class name if the {@link HEADING} attribute is defined.
  *
  * Adds the `undismissable` class name if the {@link UNDISMISSABLE} attribute is true.
  *
  * @inheritdoc
  */
 protected function alter_class_names(array $class_names)
 {
     $class_names = parent::alter_class_names($class_names);
     $context = $this[self::CONTEXT];
     if ($context) {
         $class_names['alert-' . $context] = true;
     }
     if ($this[self::HEADING]) {
         $class_names['alert-block'] = true;
     }
     if ($this[self::UNDISMISSABLE]) {
         $class_names['undismissable'] = true;
     }
     return $class_names;
 }
Ejemplo n.º 2
0
 /**
  * Adds the `widget-adjust-node` class name.
  */
 protected function alter_class_names(array $class_names)
 {
     return parent::alter_class_names($class_names) + ['widget-adjust-node' => true];
 }
Ejemplo n.º 3
0
 protected function alter_class_names(array $class_names)
 {
     return parent::alter_class_names($class_names) + array('widget-class' => 'widget-pop-or-upload-image');
 }