1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* ____ _ _ _ _ |
5
|
|
|
* | _ \| |__ | |_ ___ _ __ ___ __ _(_) | |
6
|
|
|
* | |_) | '_ \| __/ _ \ '_ ` _ \ / _` | | | |
7
|
|
|
* | __/| | | | || __/ | | | | | (_| | | | |
8
|
|
|
* |_| |_| |_|\__\___|_| |_| |_|\__,_|_|_| |
9
|
|
|
* |
10
|
|
|
* This file is part of Kristuff\Phtemail. |
11
|
|
|
* |
12
|
|
|
* (c) Kristuff <[email protected]> |
13
|
|
|
* |
14
|
|
|
* For the full copyright and license information, please view the LICENSE |
15
|
|
|
* file that was distributed with this source code. |
16
|
|
|
* |
17
|
|
|
* @version 0.2.0 |
18
|
|
|
* @copyright 2017-2020 Kristuff |
19
|
|
|
*/ |
20
|
|
|
|
21
|
|
|
namespace Kristuff\Phtemail\Core; |
22
|
|
|
|
23
|
|
|
/** |
24
|
|
|
* Class ColumnRightContainer |
25
|
|
|
* Use in layout builder like TwoColumnRow |
26
|
|
|
*/ |
27
|
|
|
class ColumnRightContainer extends ColumnLeftContainer |
28
|
|
|
{ |
29
|
|
|
/** |
30
|
|
|
* Gets the HTML |
31
|
|
|
* |
32
|
|
|
* @access public |
33
|
|
|
* @param string $indent |
34
|
|
|
* |
35
|
|
|
* @return string The html string content |
36
|
|
|
*/ |
37
|
|
|
public function getHtml(string $indent) |
38
|
|
|
{ |
39
|
|
|
$html = $indent . '<td align="right" valign="top" class="flexibleContainerBox">'. PHP_EOL; |
40
|
|
|
$html .= $indent . ' <table class="flexibleContainerBoxNext" bgcolor="'. $this->getEffectiveStyle('background-color') . |
41
|
|
|
'" border="0" cellpadding="'. $this->cellPadding .'" cellspacing="0"' . |
42
|
|
|
($this->columnWidth == 0 ? '' : ' width="' . $this->columnWidth . '"') . |
43
|
|
|
' style="max-width:100%;">'.PHP_EOL; |
44
|
|
|
$html .= $indent . ' <tr>'.PHP_EOL; |
45
|
|
|
$html .= $indent . ' <td align="'. $this->horizontalAlign .'" valign="'. $this->verticalAlign .'" class="textContent">'.PHP_EOL; |
46
|
|
|
|
47
|
|
|
// render child elements collection |
48
|
|
|
foreach ($this->elements() as $element){ |
49
|
|
|
$html .= $element->getHtml($indent . ' '); |
50
|
|
|
$html .= PHP_EOL ; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
$html .= $indent . ' </td>'.PHP_EOL; |
54
|
|
|
$html .= $indent . ' </tr>'.PHP_EOL; |
55
|
|
|
$html .= $indent . ' </table>'.PHP_EOL; |
56
|
|
|
$html .= $indent . '</td>'.PHP_EOL; |
57
|
|
|
return $html; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
} |