Ease Framework Twitter Bootstrap 4 Support
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
918 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. namespace Ease\TWB4;
  8. /**
  9. * TWB3 Compatibility class
  10. *
  11. * @author Vítězslav Dvořák <info@vitexsoftware.cz>
  12. */
  13. class Label extends Card
  14. {
  15. /**
  16. * TWB3 Backward compatibility Label
  17. *
  18. * @param string $type alert|success|danger| etc...
  19. * @param mixed $content Content inside label
  20. * @param array $properties additonal properrties for Card
  21. */
  22. public function __construct($type, $content, $properties = [])
  23. {
  24. if (array_key_exists('class', $properties)) {
  25. $properties['class'] = 'bg-'.$type.' '.$properties['class'];
  26. } else {
  27. $properties['class'] = 'bg-'.$type;
  28. }
  29. parent::__construct($content, $properties);
  30. }
  31. }