PluginProbe
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress / trunk
AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress vtrunk
11.0.5 11.0.4 11.0.3 11.0.2 11.0.1 11.0.0 10.11.1 10.11.0 10.10.2 10.10.1 10.10.0 10.9.1 trunk 10.0.0 10.0.1 10.1.0 10.1.1 10.1.2 10.1.3 10.1.4 10.2.0 10.2.1 10.2.2 10.3.0 10.4.0 All 60 releases
acymailing / back / Types / StepsType.php

StepsType.php in AcyMailing – An Ultimate Newsletter Plugin and Marketing Automation Solution for WordPress trunk, at back/Types/StepsType.php

36 lines 1020 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace AcyMailing\Types;
4
5 use AcyMailing\Core\AcymObject;
6
7 class StepsType extends AcymObject
8 {
9 public function display(array $options): void
10 {
11 if (!isset($options['currentStep']) || !isset($options['totalSteps'])) {
12 return;
13 }
14
15 $containerClasses = $options['containerClasses'] ?? 'cell large-6 xlarge-5 xxlarge-4 margin-bottom-3';
16
17 $html = '<div class="'.$containerClasses.' acym__steps__container">';
18 $html .= '<div class="acym__steps__circles">';
19 for ($i = 1; $i <= $options['totalSteps']; $i++) {
20 $stepClasses = 'acym__steps__circle';
21 if ($i < $options['currentStep']) {
22 $stepClasses .= ' acym__steps__done';
23 }
24 if ($i === $options['currentStep']) {
25 $stepClasses .= ' acym__steps__current';
26 }
27
28 $html .= '<div class="'.$stepClasses.'"></div>';
29 }
30 $html .= '</div>';
31 $html .= '</div>';
32
33 echo $html;
34 }
35 }
36