File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+ * Bootstrap 4 Card Body component.
22+ *
23+ * Renders a div element with the 'card-body' CSS class for use within Bootstrap card components.
24+ *
25+ * @author Vítězslav Dvořák <info@vitexsoftware.cz>
26+ */
27+ class CardBody extends DivTag
28+ {
29+ /**
30+ * Card.
31+ *
32+ * @param mixed $content Content to be added to the card body
33+ * @param array<string, string> $properties
34+ */
35+ public function __construct ($ content = null , array $ properties = [])
36+ {
37+ if (\array_key_exists ('class ' , $ properties )) {
38+ $ properties ['class ' ] = 'card-body ' .$ properties ['class ' ];
39+ } else {
40+ $ properties ['class ' ] = 'card-body ' ;
41+ }
42+
43+ parent ::__construct ($ content , $ properties );
44+ }
45+ }
You can’t perform that action at this time.
0 commit comments