calculateWidth($element, $columnBaseWidth);
$styles = 'display:inline-block;-webkit-text-size-adjust:none;mso-hide:all;text-decoration:none;text-align:center;' . StylesHelper::getBlockStyles($element, $exclude = ['textAlign']);
$styles = EHelper::escapeHtmlStyleAttr($styles);
$template = '
|
';
return $template;
}
public function calculateWidth($element, $columnBaseWidth) {
$columnWidth = $columnBaseWidth - (StylesHelper::$paddingWidth * 2);
$borderWidth = (int)$element['styles']['block']['borderWidth'];
$buttonWidth = (int)$element['styles']['block']['width'];
$buttonWidth = ($buttonWidth > $columnWidth) ?
$columnWidth :
$buttonWidth;
$buttonWidth = $buttonWidth - (2 * $borderWidth) . 'px';
return $buttonWidth;
}
}