Skip to content

Commit e684b25

Browse files
committed
Initial CardBody class added
1 parent 445019c commit e684b25

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

src/Ease/TWB4/CardBody.php

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* This file is part of the EaseTWBootstrap4 package
7+
*
8+
* https://github.com/VitexSoftware/php-ease-twbootstrap4
9+
*
10+
* (c) Vítězslav Dvořák <http://vitexsoftware.com>
11+
*
12+
* For the full copyright and license information, please view the LICENSE
13+
* file that was distributed with this source code.
14+
*/
15+
16+
namespace Ease\TWB4;
17+
18+
use Ease\Html\DivTag;
19+
20+
/**
21+
* Description of Card Body
22+
*
23+
* @author Vítězslav Dvořák <info@vitexsoftware.cz>
24+
*/
25+
class Card extends DivTag
26+
{
27+
/**
28+
* Card.
29+
*
30+
* @param string $content
31+
* @param array<string, string> $properties
32+
*/
33+
public function __construct($content = null, array $properties = [])
34+
{
35+
if (\array_key_exists('class', $properties)) {
36+
$properties['class'] = 'card-body '.$properties['class'];
37+
} else {
38+
$properties['class'] = 'card-body';
39+
}
40+
41+
parent::__construct($content, $properties);
42+
}
43+
}

0 commit comments

Comments
 (0)