'; } private function getMultipleColumnsContentEnd() { return '
'; } private function getBackgroundCss($styles, $image) { if ($image !== null && $image['src'] !== null) { $backgroundColor = isset($styles['backgroundColor']) && $styles['backgroundColor'] !== 'transparent' ? $styles['backgroundColor'] : '#ffffff'; $repeat = $image['display'] === 'tile' ? 'repeat' : 'no-repeat'; $size = $image['display'] === 'scale' ? 'cover' : 'contain'; $style = sprintf( 'background: %s url(%s) %s center/%s;background-color: %s;background-image: url(%s);background-repeat: %s;background-position: center;background-size: %s;', $backgroundColor, $image['src'], $repeat, $size, $backgroundColor, $image['src'], $repeat, $size ); return EHelper::escapeHtmlStyleAttr($style); } else { if (!isset($styles['backgroundColor'])) return false; $backgroundColor = $styles['backgroundColor']; return ($backgroundColor !== 'transparent') ? EHelper::escapeHtmlStyleAttr(sprintf('background-color:%s!important;', $backgroundColor)) : false; } } private function getBgColorAttribute($styles, $image) { if ( ($image === null || $image['src'] === null) && isset($styles['backgroundColor']) && $styles['backgroundColor'] !== 'transparent' ) { return 'bgcolor="' . EHelper::escapeHtmlAttr($styles['backgroundColor']) . '"'; } return null; } }