|
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\HtmlElements; |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* Class RowDivider |
|
25
|
|
|
* Row divider |
|
26
|
|
|
*/ |
|
27
|
|
|
class RowDivider extends Row |
|
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 result. start with an empty string or a html comment |
|
40
|
|
|
$html = $this->getBuilder()->getHtmlComment('ROW DIVIDER' . ' //', $indent); |
|
41
|
|
|
|
|
42
|
|
|
$html .= $indent . '<tr>'.PHP_EOL; |
|
43
|
|
|
$html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
44
|
|
|
|
|
45
|
|
|
$html .= $this->getBuilder()->getHtmlComment('CENTERING TABLE //', $indent . ' '); |
|
46
|
|
|
|
|
47
|
|
|
$html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="'. $this->getEffectiveStyle('background-color').'">'.PHP_EOL; |
|
48
|
|
|
$html .= $indent . ' <tr '. $this->getRowStyle() .'>'.PHP_EOL; |
|
49
|
|
|
$html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
50
|
|
|
|
|
51
|
|
|
$html .= $this->getBuilder()->getHtmlComment('FLEXIBLE CONTAINER //', $indent . ' '); |
|
52
|
|
|
|
|
53
|
|
|
$html .= $indent . ' <table border="0" cellspacing="0" cellpadding="' . $this->cellPadding . |
|
54
|
|
|
'" bgcolor="'. $this->getEffectiveStyle('background-color'). |
|
55
|
|
|
'" width="'. $this->getBuilder()->emailBodyWidth() . |
|
56
|
|
|
'" class="flexibleContainer">'.PHP_EOL; |
|
57
|
|
|
$html .= $indent . ' <tr>'.PHP_EOL; |
|
58
|
|
|
$html .= $indent . ' <td '. $this->getRowStyle(). |
|
59
|
|
|
' align="center" valign="top" width="'. $this->getBuilder()->emailBodyWidth() . |
|
60
|
|
|
'" class="flexibleContainerCell">'.PHP_EOL; |
|
61
|
|
|
|
|
62
|
|
|
$html .= $this->getBuilder()->getHtmlComment('CONTENT TABLE //', $indent . ' '); |
|
63
|
|
|
|
|
64
|
|
|
$html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">'.PHP_EOL; |
|
65
|
|
|
$html .= $indent . ' <tr>'.PHP_EOL; |
|
66
|
|
|
$html .= $indent . ' <td align="center" valign="top" style="border-top:1px solid '. $this->getEffectiveStyle('color') . ';"></td>'.PHP_EOL; |
|
67
|
|
|
$html .= $indent . ' </tr>'.PHP_EOL; |
|
68
|
|
|
$html .= $indent . ' </table>'.PHP_EOL; |
|
69
|
|
|
|
|
70
|
|
|
$html .= $this->getBuilder()->getHtmlComment('// CONTENT TABLE', $indent . ' '); |
|
71
|
|
|
|
|
72
|
|
|
$html .= $indent . ' </td>'.PHP_EOL; |
|
73
|
|
|
$html .= $indent . ' </tr>'.PHP_EOL; |
|
74
|
|
|
$html .= $indent . ' </table>'.PHP_EOL; |
|
75
|
|
|
|
|
76
|
|
|
$html .= $this->getBuilder()->getHtmlComment('// FLEXIBLE CONTAINER', $indent . ' '); |
|
77
|
|
|
|
|
78
|
|
|
$html .= $indent . ' </td>'.PHP_EOL; |
|
79
|
|
|
$html .= $indent . ' </tr>'.PHP_EOL; |
|
80
|
|
|
$html .= $indent . ' </table>'.PHP_EOL; |
|
81
|
|
|
|
|
82
|
|
|
$html .= $this->getBuilder()->getHtmlComment('// CENTERING TABLE', $indent . ' '); |
|
83
|
|
|
|
|
84
|
|
|
$html .= $indent . ' </td>'.PHP_EOL; |
|
85
|
|
|
$html .= $indent . '</tr>'.PHP_EOL; |
|
86
|
|
|
|
|
87
|
|
|
$html .= $this->getBuilder()->getHtmlComment('// ' . 'ROW DIVIDER', $indent); |
|
88
|
|
|
return $html; |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
} |
|
92
|
|
|
|
|
93
|
|
|
|