@@ -42,14 +42,14 @@ discard block |
||
| 42 | 42 | * |
| 43 | 43 | * @access public |
| 44 | 44 | */ |
| 45 | - public const COLOR_WHITE = '#FFFFFF' ; |
|
| 46 | - public const COLOR_BLACK = '#000000' ; |
|
| 47 | - public const COLOR_BLUE = '#2E7BA2' ; |
|
| 48 | - public const COLOR_GREEN = '#26A85C' ; |
|
| 49 | - public const COLOR_ORANGE = '#f26522' ; |
|
| 50 | - public const COLOR_RED = '#c21a1a' ; |
|
| 51 | - public const COLOR_YELLOW = '#e4c515' ; |
|
| 52 | - public const COLOR_MAGENTA = '#b64aa9' ; |
|
| 45 | + public const COLOR_WHITE = '#FFFFFF'; |
|
| 46 | + public const COLOR_BLACK = '#000000'; |
|
| 47 | + public const COLOR_BLUE = '#2E7BA2'; |
|
| 48 | + public const COLOR_GREEN = '#26A85C'; |
|
| 49 | + public const COLOR_ORANGE = '#f26522'; |
|
| 50 | + public const COLOR_RED = '#c21a1a'; |
|
| 51 | + public const COLOR_YELLOW = '#e4c515'; |
|
| 52 | + public const COLOR_MAGENTA = '#b64aa9'; |
|
| 53 | 53 | |
| 54 | 54 | public const COLOR_LIGHTGRAY = '#cccccc'; |
| 55 | 55 | public const COLOR_DARKGRAY = '#1E1F22'; |
@@ -64,9 +64,9 @@ discard block |
||
| 64 | 64 | public const COLOR_GRAY_800 = '#1e1f22'; |
| 65 | 65 | public const COLOR_GRAY_900 = '#141416'; |
| 66 | 66 | |
| 67 | - public const COLOR_STATUS_ERROR = '#c41818' ; |
|
| 68 | - public const COLOR_STATUS_SUCCESS = '#118a39' ; |
|
| 69 | - public const COLOR_STATUS_WARNING = '#e79c11' ; |
|
| 67 | + public const COLOR_STATUS_ERROR = '#c41818'; |
|
| 68 | + public const COLOR_STATUS_SUCCESS = '#118a39'; |
|
| 69 | + public const COLOR_STATUS_WARNING = '#e79c11'; |
|
| 70 | 70 | |
| 71 | 71 | /** |
| 72 | 72 | * Gets whether html comments are rendered when calling the calling the HtmlEmailBuilder::getHtml() method. |
@@ -184,13 +184,13 @@ discard block |
||
| 184 | 184 | // Must be a valid hex value. |
| 185 | 185 | $length = mb_strlen($color); |
| 186 | 186 | |
| 187 | - if ( ($length === 3 || $length === 6 ) && ctype_xdigit($color) ) { |
|
| 187 | + if (($length === 3 || $length === 6) && ctype_xdigit($color)) { |
|
| 188 | 188 | // return prefixed uppercase hex color string |
| 189 | - return '#'. strtoupper($color); |
|
| 189 | + return '#' . strtoupper($color); |
|
| 190 | 190 | }; |
| 191 | 191 | |
| 192 | 192 | // something was wrong |
| 193 | - throw new \InvalidArgumentException('Value passed was not a valid hex color. Value was [' . $color .']'); |
|
| 193 | + throw new \InvalidArgumentException('Value passed was not a valid hex color. Value was [' . $color . ']'); |
|
| 194 | 194 | } |
| 195 | 195 | |
| 196 | 196 | /** |
@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | */ |
| 216 | 216 | public function renderHtmlComments(bool $value) |
| 217 | 217 | { |
| 218 | - $this->renderHtmlComments= $value; |
|
| 218 | + $this->renderHtmlComments = $value; |
|
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | /** |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | */ |
| 388 | 388 | public function emailBodyFontSize() |
| 389 | 389 | { |
| 390 | - return $this->emailBodyFontSize .'px'; |
|
| 390 | + return $this->emailBodyFontSize . 'px'; |
|
| 391 | 391 | } |
| 392 | 392 | |
| 393 | 393 | /** |
@@ -80,15 +80,15 @@ |
||
| 80 | 80 | public function getHtml(string $indent) |
| 81 | 81 | { |
| 82 | 82 | // html result. start with an empty string or a html comment |
| 83 | - $html = $this->getBuilder()->getHtmlComment('BLOCK', $indent); |
|
| 83 | + $html = $this->getBuilder()->getHtmlComment('BLOCK', $indent); |
|
| 84 | 84 | |
| 85 | 85 | // render child elements collection |
| 86 | - foreach ($this->elements() as $element){ |
|
| 86 | + foreach ($this->elements() as $element) { |
|
| 87 | 87 | $html .= PHP_EOL . $element->getHtml($indent); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | // ending comment |
| 91 | - $html .= $this->getBuilder()->getHtmlComment('END BLOCK', $indent); |
|
| 91 | + $html .= $this->getBuilder()->getHtmlComment('END BLOCK', $indent); |
|
| 92 | 92 | |
| 93 | 93 | // return the build html |
| 94 | 94 | return $html; |
@@ -36,24 +36,24 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function getHtml(string $indent) |
| 38 | 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"' . |
|
| 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 | 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; |
|
| 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 | 46 | |
| 47 | 47 | // render child elements collection |
| 48 | - foreach ($this->elements() as $element){ |
|
| 48 | + foreach ($this->elements() as $element) { |
|
| 49 | 49 | $html .= $element->getHtml($indent . ' '); |
| 50 | - $html .= PHP_EOL ; |
|
| 50 | + $html .= PHP_EOL; |
|
| 51 | 51 | } |
| 52 | 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; |
|
| 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 | 57 | return $html; |
| 58 | 58 | } |
| 59 | 59 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | public function getBuilder() |
| 60 | 60 | { |
| 61 | 61 | // try with the first level parent |
| 62 | - if ($this->parent instanceof HtmlEmailBuilder){ |
|
| 62 | + if ($this->parent instanceof HtmlEmailBuilder) { |
|
| 63 | 63 | return $this->parent; |
| 64 | 64 | } |
| 65 | 65 | |
@@ -90,21 +90,21 @@ discard block |
||
| 90 | 90 | public function getEffectiveStyle(string $key) |
| 91 | 91 | { |
| 92 | 92 | // first look if key style is defined in this element |
| 93 | - if (array_key_exists($key, $this->styles)){ |
|
| 93 | + if (array_key_exists($key, $this->styles)) { |
|
| 94 | 94 | return $this->styles[$key]; |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | // look into parent |
| 98 | - if (!$this->parent instanceof HtmlEmailBuilder){ |
|
| 98 | + if (!$this->parent instanceof HtmlEmailBuilder) { |
|
| 99 | 99 | $style = $this->parent->getEffectiveStyle($key); |
| 100 | - if (!empty($style)){ |
|
| 100 | + if (!empty($style)) { |
|
| 101 | 101 | return $style; |
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | 105 | // get default |
| 106 | - if (in_array($key, $this->knowStyles)){ |
|
| 107 | - switch ($key){ |
|
| 106 | + if (in_array($key, $this->knowStyles)) { |
|
| 107 | + switch ($key) { |
|
| 108 | 108 | case 'padding-top': return '0'; |
| 109 | 109 | case 'padding-bottom': return '0'; |
| 110 | 110 | case 'padding-left': return '0'; |
@@ -130,18 +130,18 @@ discard block |
||
| 130 | 130 | protected function getInlineStyles() |
| 131 | 131 | { |
| 132 | 132 | $stylesCollection = []; |
| 133 | - foreach ($this->styles as $key => $value){ |
|
| 134 | - $stylesCollection[] = $key. ':' . $value; |
|
| 133 | + foreach ($this->styles as $key => $value) { |
|
| 134 | + $stylesCollection[] = $key . ':' . $value; |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | // check for mandatory styles |
| 138 | - foreach ($this->mandatoryStyles as $style){ |
|
| 139 | - if (!array_key_exists($style, $this->styles)){ |
|
| 138 | + foreach ($this->mandatoryStyles as $style) { |
|
| 139 | + if (!array_key_exists($style, $this->styles)) { |
|
| 140 | 140 | $stylesCollection[] = $style . ':' . $this->getEffectiveStyle($style); |
| 141 | 141 | } |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | - return !empty($stylesCollection) ? ' style="'. implode(';', $stylesCollection) .'"' : ''; |
|
| 144 | + return !empty($stylesCollection) ? ' style="' . implode(';', $stylesCollection) . '"' : ''; |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | } |
| 148 | 148 | \ No newline at end of file |
@@ -157,14 +157,14 @@ discard block |
||
| 157 | 157 | $html .= '</head>' . PHP_EOL; |
| 158 | 158 | |
| 159 | 159 | // start body (document body, not the email body...), center table |
| 160 | - $html .= '<body bgcolor="'. $this->backsideBackgroundColor .'" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">'. PHP_EOL; |
|
| 160 | + $html .= '<body bgcolor="' . $this->backsideBackgroundColor . '" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">' . PHP_EOL; |
|
| 161 | 161 | |
| 162 | 162 | $html .= $this->getHtmlComment('CENTER THE EMAIL //', ' '); |
| 163 | 163 | |
| 164 | - $html .= ' <center style="background-color:'. $this->backsideBackgroundColor .';">'. PHP_EOL; |
|
| 165 | - $html .= ' <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable" style="table-layout: fixed;max-width:100% !important;width: 100% !important;min-width: 100% !important;">'. PHP_EOL; |
|
| 166 | - $html .= ' <tr>'. PHP_EOL; |
|
| 167 | - $html .= ' <td align="center" valign="top" id="bodyCell">'. PHP_EOL; |
|
| 164 | + $html .= ' <center style="background-color:' . $this->backsideBackgroundColor . ';">' . PHP_EOL; |
|
| 165 | + $html .= ' <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="bodyTable" style="table-layout: fixed;max-width:100% !important;width: 100% !important;min-width: 100% !important;">' . PHP_EOL; |
|
| 166 | + $html .= ' <tr>' . PHP_EOL; |
|
| 167 | + $html .= ' <td align="center" valign="top" id="bodyCell">' . PHP_EOL; |
|
| 168 | 168 | |
| 169 | 169 | // render child elements collection |
| 170 | 170 | $html .= $this->headerContainer->getHtml(' '); |
@@ -172,11 +172,11 @@ discard block |
||
| 172 | 172 | $html .= $this->footerContainer->getHtml(' '); |
| 173 | 173 | |
| 174 | 174 | // close centered table |
| 175 | - $html .= ' </td>'. PHP_EOL; |
|
| 176 | - $html .= ' </tr>'. PHP_EOL; |
|
| 177 | - $html .= ' </table>'. PHP_EOL; |
|
| 175 | + $html .= ' </td>' . PHP_EOL; |
|
| 176 | + $html .= ' </tr>' . PHP_EOL; |
|
| 177 | + $html .= ' </table>' . PHP_EOL; |
|
| 178 | 178 | $html .= $this->getHtmlComment('// CENTER THE EMAIL', ' '); |
| 179 | - $html .= ' </center>'. PHP_EOL; |
|
| 179 | + $html .= ' </center>' . PHP_EOL; |
|
| 180 | 180 | |
| 181 | 181 | // close body and html tags and returns html |
| 182 | 182 | $html .= '</body>' . PHP_EOL; |
@@ -41,57 +41,57 @@ |
||
| 41 | 41 | // html result. start with an empty string or a html comment |
| 42 | 42 | $html = $this->getBuilder()->getHtmlComment('ROW CONTAINER' . ' //', $indent); |
| 43 | 43 | |
| 44 | - $html .= $indent . '<tr>'.PHP_EOL; |
|
| 45 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 44 | + $html .= $indent . '<tr>' . PHP_EOL; |
|
| 45 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 46 | 46 | |
| 47 | 47 | $html .= $this->getBuilder()->getHtmlComment('CENTERING TABLE //', $indent . ' '); |
| 48 | 48 | |
| 49 | - $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="'. $this->getEffectiveStyle('background-color').'">'.PHP_EOL; |
|
| 50 | - $html .= $indent . ' <tr '. $this->getRowStyle() .'>'.PHP_EOL; |
|
| 51 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 49 | + $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="' . $this->getEffectiveStyle('background-color') . '">' . PHP_EOL; |
|
| 50 | + $html .= $indent . ' <tr ' . $this->getRowStyle() . '>' . PHP_EOL; |
|
| 51 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 52 | 52 | |
| 53 | 53 | $html .= $this->getBuilder()->getHtmlComment('FLEXIBLE CONTAINER //', $indent . ' '); |
| 54 | 54 | |
| 55 | 55 | $html .= $indent . ' <table border="0" cellspacing="0" cellpadding="' . $this->cellPadding . |
| 56 | - '" bgcolor="'. $this->getEffectiveStyle('background-color'). |
|
| 57 | - '" width="'. $this->getBuilder()->emailBodyWidth() . |
|
| 58 | - '" class="flexibleContainer">'.PHP_EOL; |
|
| 59 | - $html .= $indent . ' <tr>'.PHP_EOL; |
|
| 60 | - $html .= $indent . ' <td '. $this->getRowStyle() . |
|
| 61 | - ' align="center" valign="top" width="'. $this->getBuilder()->emailBodyWidth() . |
|
| 62 | - '" class="flexibleContainerCell">'.PHP_EOL; |
|
| 56 | + '" bgcolor="' . $this->getEffectiveStyle('background-color') . |
|
| 57 | + '" width="' . $this->getBuilder()->emailBodyWidth() . |
|
| 58 | + '" class="flexibleContainer">' . PHP_EOL; |
|
| 59 | + $html .= $indent . ' <tr>' . PHP_EOL; |
|
| 60 | + $html .= $indent . ' <td ' . $this->getRowStyle() . |
|
| 61 | + ' align="center" valign="top" width="' . $this->getBuilder()->emailBodyWidth() . |
|
| 62 | + '" class="flexibleContainerCell">' . PHP_EOL; |
|
| 63 | 63 | |
| 64 | 64 | $html .= $this->getBuilder()->getHtmlComment('CONTENT TABLE //', $indent . ' '); |
| 65 | 65 | |
| 66 | - $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">'.PHP_EOL; |
|
| 67 | - $html .= $indent . ' <tr>'.PHP_EOL; |
|
| 68 | - $html .= $indent . ' <td align="'. $this->horizontalAlign .'" valign="'. $this->verticalAlign .'" style="color:'. $this->getEffectiveStyle('color') . ';" bgcolor="'. $this->getEffectiveStyle('background-color') . '">'.PHP_EOL; |
|
| 66 | + $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">' . PHP_EOL; |
|
| 67 | + $html .= $indent . ' <tr>' . PHP_EOL; |
|
| 68 | + $html .= $indent . ' <td align="' . $this->horizontalAlign . '" valign="' . $this->verticalAlign . '" style="color:' . $this->getEffectiveStyle('color') . ';" bgcolor="' . $this->getEffectiveStyle('background-color') . '">' . PHP_EOL; |
|
| 69 | 69 | |
| 70 | 70 | // render child elements collection |
| 71 | - foreach ($this->childElements as $element){ |
|
| 72 | - $html .= $element->getHtml($indent . ' '). PHP_EOL; |
|
| 71 | + foreach ($this->childElements as $element) { |
|
| 72 | + $html .= $element->getHtml($indent . ' ') . PHP_EOL; |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 76 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 77 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 75 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 76 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 77 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 78 | 78 | |
| 79 | 79 | $html .= $this->getBuilder()->getHtmlComment('// CONTENT TABLE', $indent . ' '); |
| 80 | 80 | |
| 81 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 82 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 83 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 81 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 82 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 83 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 84 | 84 | |
| 85 | 85 | $html .= $this->getBuilder()->getHtmlComment('// FLEXIBLE CONTAINER', $indent . ' '); |
| 86 | 86 | |
| 87 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 88 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 89 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 87 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 88 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 89 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 90 | 90 | |
| 91 | 91 | $html .= $this->getBuilder()->getHtmlComment('// CENTERING TABLE', $indent . ' '); |
| 92 | 92 | |
| 93 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 94 | - $html .= $indent . '</tr>'.PHP_EOL; |
|
| 93 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 94 | + $html .= $indent . '</tr>' . PHP_EOL; |
|
| 95 | 95 | |
| 96 | 96 | $html .= $this->getBuilder()->getHtmlComment('// ' . 'ROW CONTAINER', $indent); |
| 97 | 97 | return $html; |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | $this->buttonText = $content; |
| 53 | 53 | $this->buttonSrc = $src; |
| 54 | 54 | $this->styles['button_background'] = '#DA5A20'; |
| 55 | - $this->styles['button_color'] = '#EEEEEE'; |
|
| 56 | - $this->styles['button_padding'] = '15'; |
|
| 55 | + $this->styles['button_color'] = '#EEEEEE'; |
|
| 56 | + $this->styles['button_padding'] = '15'; |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -110,69 +110,69 @@ discard block |
||
| 110 | 110 | // html result. start with an empty string or a html comment |
| 111 | 111 | $html = $this->getBuilder()->getHtmlComment('ROW BUTTON ' . ' //', $indent); |
| 112 | 112 | |
| 113 | - $html .= $indent . '<tr>'.PHP_EOL; |
|
| 114 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 113 | + $html .= $indent . '<tr>' . PHP_EOL; |
|
| 114 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 115 | 115 | |
| 116 | 116 | $html .= $this->getBuilder()->getHtmlComment('CENTERING TABLE //', $indent . ' '); |
| 117 | 117 | |
| 118 | - $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">'.PHP_EOL; |
|
| 119 | - $html .= $indent . ' <tr '. $this->getRowStyle() .'>'.PHP_EOL; |
|
| 120 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 118 | + $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">' . PHP_EOL; |
|
| 119 | + $html .= $indent . ' <tr ' . $this->getRowStyle() . '>' . PHP_EOL; |
|
| 120 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 121 | 121 | |
| 122 | 122 | $html .= $this->getBuilder()->getHtmlComment('FLEXIBLE CONTAINER //', $indent . ' '); |
| 123 | 123 | |
| 124 | - $html .= $indent . ' <table border="0" cellpadding="' . $this->cellPadding. |
|
| 125 | - '" cellspacing="0" width="'. $this->getBuilder()->emailBodyWidth() . |
|
| 126 | - '" class="flexibleContainer">'.PHP_EOL; |
|
| 124 | + $html .= $indent . ' <table border="0" cellpadding="' . $this->cellPadding . |
|
| 125 | + '" cellspacing="0" width="' . $this->getBuilder()->emailBodyWidth() . |
|
| 126 | + '" class="flexibleContainer">' . PHP_EOL; |
|
| 127 | 127 | |
| 128 | - $html .= $indent . ' <tr>'.PHP_EOL; |
|
| 129 | - $html .= $indent . ' <td '. $this->getRowStyle() . |
|
| 130 | - ' align="center" valign="top" width="'. $this->getBuilder()->emailBodyWidth() . |
|
| 131 | - '" class="flexibleContainerCell">'.PHP_EOL; |
|
| 128 | + $html .= $indent . ' <tr>' . PHP_EOL; |
|
| 129 | + $html .= $indent . ' <td ' . $this->getRowStyle() . |
|
| 130 | + ' align="center" valign="top" width="' . $this->getBuilder()->emailBodyWidth() . |
|
| 131 | + '" class="flexibleContainerCell">' . PHP_EOL; |
|
| 132 | 132 | |
| 133 | 133 | $html .= $this->getBuilder()->getHtmlComment('CONTENT TABLE //', $indent . ' '); |
| 134 | 134 | |
| 135 | - $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="50%"'. |
|
| 136 | - ' class="emailButton" style="background-color: '. |
|
| 137 | - $this->getEffectiveStyle('background-color') . ';">'.PHP_EOL; |
|
| 135 | + $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="50%"' . |
|
| 136 | + ' class="emailButton" style="background-color: ' . |
|
| 137 | + $this->getEffectiveStyle('background-color') . ';">' . PHP_EOL; |
|
| 138 | 138 | |
| 139 | - $html .= $indent . ' <tr>'.PHP_EOL; |
|
| 140 | - $html .= $indent . ' <td align="center" valign="middle" class="buttonContent" cellpadding="0" '. |
|
| 141 | - 'bgcolor="'.$this->getEffectiveStyle('button_background').'"'. |
|
| 142 | - ' style="'. |
|
| 143 | - 'padding-top:' . $this->getEffectiveStyle('button_padding'). 'px;'. |
|
| 144 | - 'padding-bottom:' . $this->getEffectiveStyle('button_padding'). 'px;'. |
|
| 145 | - 'padding-left:' . $this->getEffectiveStyle('button_padding'). 'px;'. |
|
| 146 | - 'padding-right:' . $this->getEffectiveStyle('button_padding'). 'px;'. |
|
| 147 | - '"'. |
|
| 148 | - '>'.PHP_EOL; |
|
| 149 | - $html .= $indent . ' <a style="color:'. $this->getEffectiveStyle('button_color') . |
|
| 139 | + $html .= $indent . ' <tr>' . PHP_EOL; |
|
| 140 | + $html .= $indent . ' <td align="center" valign="middle" class="buttonContent" cellpadding="0" ' . |
|
| 141 | + 'bgcolor="' . $this->getEffectiveStyle('button_background') . '"' . |
|
| 142 | + ' style="' . |
|
| 143 | + 'padding-top:' . $this->getEffectiveStyle('button_padding') . 'px;' . |
|
| 144 | + 'padding-bottom:' . $this->getEffectiveStyle('button_padding') . 'px;' . |
|
| 145 | + 'padding-left:' . $this->getEffectiveStyle('button_padding') . 'px;' . |
|
| 146 | + 'padding-right:' . $this->getEffectiveStyle('button_padding') . 'px;' . |
|
| 147 | + '"' . |
|
| 148 | + '>' . PHP_EOL; |
|
| 149 | + $html .= $indent . ' <a style="color:' . $this->getEffectiveStyle('button_color') . |
|
| 150 | 150 | ';text-decoration:none;font-family:' . $this->getEffectiveStyle('font') . |
| 151 | 151 | ';font-size:20px;line-height:135%;" ' . |
| 152 | 152 | 'href="' . $this->buttonSrc . '" target="_blank">' . |
| 153 | 153 | $this->buttonText . |
| 154 | - '</a>'.PHP_EOL; |
|
| 154 | + '</a>' . PHP_EOL; |
|
| 155 | 155 | |
| 156 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 157 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 158 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 156 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 157 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 158 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 159 | 159 | |
| 160 | 160 | $html .= $this->getBuilder()->getHtmlComment('// CONTENT TABLE', $indent . ' '); |
| 161 | 161 | |
| 162 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 163 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 164 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 162 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 163 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 164 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 165 | 165 | |
| 166 | 166 | $html .= $this->getBuilder()->getHtmlComment('// FLEXIBLE CONTAINER', $indent . ' '); |
| 167 | 167 | |
| 168 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 169 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 170 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 168 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 169 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 170 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 171 | 171 | |
| 172 | 172 | $html .= $this->getBuilder()->getHtmlComment('// CENTERING TABLE', $indent . ' '); |
| 173 | 173 | |
| 174 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 175 | - $html .= $indent . '</tr>'.PHP_EOL; |
|
| 174 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 175 | + $html .= $indent . '</tr>' . PHP_EOL; |
|
| 176 | 176 | |
| 177 | 177 | $html .= $this->getBuilder()->getHtmlComment('// ' . 'ROW BUTTON', $indent); |
| 178 | 178 | return $html; |
@@ -99,59 +99,59 @@ |
||
| 99 | 99 | // html result. start with an empty string or a html comment |
| 100 | 100 | $html = $this->getBuilder()->getHtmlComment('ROW TWO COLUMNS CONTAINER' . ' //', $indent); |
| 101 | 101 | |
| 102 | - $html .= $indent . '<tr>'.PHP_EOL; |
|
| 103 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 102 | + $html .= $indent . '<tr>' . PHP_EOL; |
|
| 103 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 104 | 104 | |
| 105 | 105 | $html .= $this->getBuilder()->getHtmlComment('CENTERING TABLE //', $indent . ' '); |
| 106 | 106 | |
| 107 | - $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="'. $this->getEffectiveStyle('background-color').'">'.PHP_EOL; |
|
| 108 | - $html .= $indent . ' <tr'. $this->getRowStyle() .'>'.PHP_EOL; |
|
| 109 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 107 | + $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="' . $this->getEffectiveStyle('background-color') . '">' . PHP_EOL; |
|
| 108 | + $html .= $indent . ' <tr' . $this->getRowStyle() . '>' . PHP_EOL; |
|
| 109 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 110 | 110 | |
| 111 | 111 | $html .= $this->getBuilder()->getHtmlComment('FLEXIBLE CONTAINER //', $indent . ' '); |
| 112 | 112 | |
| 113 | - $html .= $indent . ' <table border="0" cellspacing="0" cellpadding="'. $this->cellPadding . |
|
| 114 | - '" bgcolor="'. $this->getEffectiveStyle('background-color'). |
|
| 115 | - '" width="'. $this->getBuilder()->emailBodyWidth() . |
|
| 116 | - '" class="flexibleContainer">'.PHP_EOL; |
|
| 117 | - $html .= $indent . ' <tr>'.PHP_EOL; |
|
| 118 | - $html .= $indent . ' <td'.$this->getRowStyle(). |
|
| 119 | - ' align="center" valign="top" width="'. $this->getBuilder()->emailBodyWidth() . |
|
| 120 | - '" class="flexibleContainerCell">'.PHP_EOL; |
|
| 113 | + $html .= $indent . ' <table border="0" cellspacing="0" cellpadding="' . $this->cellPadding . |
|
| 114 | + '" bgcolor="' . $this->getEffectiveStyle('background-color') . |
|
| 115 | + '" width="' . $this->getBuilder()->emailBodyWidth() . |
|
| 116 | + '" class="flexibleContainer">' . PHP_EOL; |
|
| 117 | + $html .= $indent . ' <tr>' . PHP_EOL; |
|
| 118 | + $html .= $indent . ' <td' . $this->getRowStyle() . |
|
| 119 | + ' align="center" valign="top" width="' . $this->getBuilder()->emailBodyWidth() . |
|
| 120 | + '" class="flexibleContainerCell">' . PHP_EOL; |
|
| 121 | 121 | |
| 122 | 122 | $html .= $this->getBuilder()->getHtmlComment('CONTENT TABLE //', $indent . ' '); |
| 123 | 123 | |
| 124 | - $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">'.PHP_EOL; |
|
| 125 | - $html .= $indent . ' <tr>'.PHP_EOL; |
|
| 124 | + $html .= $indent . ' <table border="0" cellpadding="0" cellspacing="0" width="100%">' . PHP_EOL; |
|
| 125 | + $html .= $indent . ' <tr>' . PHP_EOL; |
|
| 126 | 126 | |
| 127 | 127 | $html .= $this->getBuilder()->getHtmlComment('COLUMN LEFT //', $indent . ' '); |
| 128 | 128 | $html .= $this->leftColumn()->getHtml($indent . ' '); |
| 129 | 129 | $html .= $this->getBuilder()->getHtmlComment('// COLUMN LEFT', $indent . ' '); |
| 130 | 130 | |
| 131 | - $html .= $this->getBuilder()->getHtmlComment('COLUMN RIGHT //', $indent. ' '); |
|
| 131 | + $html .= $this->getBuilder()->getHtmlComment('COLUMN RIGHT //', $indent . ' '); |
|
| 132 | 132 | $html .= $this->rightColumn()->getHtml($indent . ' '); |
| 133 | - $html .= $this->getBuilder()->getHtmlComment('// COLUMN RIGHT', $indent. ' '); |
|
| 133 | + $html .= $this->getBuilder()->getHtmlComment('// COLUMN RIGHT', $indent . ' '); |
|
| 134 | 134 | |
| 135 | 135 | |
| 136 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 137 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 136 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 137 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 138 | 138 | |
| 139 | 139 | $html .= $this->getBuilder()->getHtmlComment('// CONTENT TABLE', $indent . ' '); |
| 140 | 140 | |
| 141 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 142 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 143 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 141 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 142 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 143 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 144 | 144 | |
| 145 | 145 | $html .= $this->getBuilder()->getHtmlComment('// FLEXIBLE CONTAINER', $indent . ' '); |
| 146 | 146 | |
| 147 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 148 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 149 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 147 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 148 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 149 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 150 | 150 | |
| 151 | 151 | $html .= $this->getBuilder()->getHtmlComment('// CENTERING TABLE', $indent . ' '); |
| 152 | 152 | |
| 153 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 154 | - $html .= $indent . '</tr>'.PHP_EOL; |
|
| 153 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 154 | + $html .= $indent . '</tr>' . PHP_EOL; |
|
| 155 | 155 | |
| 156 | 156 | $html .= $this->getBuilder()->getHtmlComment('// ' . 'ROW TWO COLUMNS CONTAINER', $indent); |
| 157 | 157 | return $html; |
@@ -39,50 +39,50 @@ |
||
| 39 | 39 | // html result. start with an empty string or a html comment |
| 40 | 40 | $html = $this->getBuilder()->getHtmlComment('ROW DIVIDER' . ' //', $indent); |
| 41 | 41 | |
| 42 | - $html .= $indent . '<tr>'.PHP_EOL; |
|
| 43 | - $html .= $indent . ' <td align="center" valign="top">'.PHP_EOL; |
|
| 42 | + $html .= $indent . '<tr>' . PHP_EOL; |
|
| 43 | + $html .= $indent . ' <td align="center" valign="top">' . PHP_EOL; |
|
| 44 | 44 | |
| 45 | 45 | $html .= $this->getBuilder()->getHtmlComment('CENTERING TABLE //', $indent . ' '); |
| 46 | 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; |
|
| 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 | 50 | |
| 51 | 51 | $html .= $this->getBuilder()->getHtmlComment('FLEXIBLE CONTAINER //', $indent . ' '); |
| 52 | 52 | |
| 53 | 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; |
|
| 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 | 61 | |
| 62 | 62 | $html .= $this->getBuilder()->getHtmlComment('CONTENT TABLE //', $indent . ' '); |
| 63 | 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; |
|
| 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 | 69 | |
| 70 | 70 | $html .= $this->getBuilder()->getHtmlComment('// CONTENT TABLE', $indent . ' '); |
| 71 | 71 | |
| 72 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 73 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 74 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 72 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 73 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 74 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 75 | 75 | |
| 76 | 76 | $html .= $this->getBuilder()->getHtmlComment('// FLEXIBLE CONTAINER', $indent . ' '); |
| 77 | 77 | |
| 78 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 79 | - $html .= $indent . ' </tr>'.PHP_EOL; |
|
| 80 | - $html .= $indent . ' </table>'.PHP_EOL; |
|
| 78 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 79 | + $html .= $indent . ' </tr>' . PHP_EOL; |
|
| 80 | + $html .= $indent . ' </table>' . PHP_EOL; |
|
| 81 | 81 | |
| 82 | 82 | $html .= $this->getBuilder()->getHtmlComment('// CENTERING TABLE', $indent . ' '); |
| 83 | 83 | |
| 84 | - $html .= $indent . ' </td>'.PHP_EOL; |
|
| 85 | - $html .= $indent . '</tr>'.PHP_EOL; |
|
| 84 | + $html .= $indent . ' </td>' . PHP_EOL; |
|
| 85 | + $html .= $indent . '</tr>' . PHP_EOL; |
|
| 86 | 86 | |
| 87 | 87 | $html .= $this->getBuilder()->getHtmlComment('// ' . 'ROW DIVIDER', $indent); |
| 88 | 88 | return $html; |