How to use progressBar class

Best Atoum code snippet using progressBar

premium-progressbar.php

Source:premium-progressbar.php Github

copy

Full Screen

1<?php2/**3 * Premium Progress Bar.4 */5namespace PremiumAddons\Widgets;6// Elementor Classes.7use Elementor\Widget_Base;8use Elementor\Utils;9use Elementor\Controls_Manager;10use Elementor\Icons_Manager;11use Elementor\Repeater;12use Elementor\Core\Kits\Documents\Tabs\Global_Colors;13use Elementor\Core\Kits\Documents\Tabs\Global_Typography;14use Elementor\Group_Control_Typography;15use Elementor\Group_Control_Background;16use Elementor\Group_Control_Border;17// PremiumAddons Classes.18use PremiumAddons\Includes\Helper_Functions;19if ( ! defined( 'ABSPATH' ) ) {20 exit; // If this file is called directly, abort.21}22/**23 * Class Premium_Progressbar24 */25class Premium_Progressbar extends Widget_Base {26 /**27 * Retrieve Widget Name.28 *29 * @since 1.0.030 * @access public31 */32 public function get_name() {33 return 'premium-addon-progressbar';34 }35 /**36 * Retrieve Widget Title.37 *38 * @since 1.0.039 * @access public40 */41 public function get_title() {42 return sprintf( '%1$s %2$s', Helper_Functions::get_prefix(), __( 'Progress Bar', 'premium-addons-for-elementor' ) );43 }44 /**45 * Retrieve Widget Icon.46 *47 * @since 1.0.048 * @access public49 *50 * @return string widget icon.51 */52 public function get_icon() {53 return 'pa-progress-bar';54 }55 /**56 * Retrieve Widget Categories.57 *58 * @since 1.5.159 * @access public60 *61 * @return array Widget categories.62 */63 public function get_categories() {64 return array( 'premium-elements' );65 }66 /**67 * Retrieve Widget Dependent CSS.68 *69 * @since 1.0.070 * @access public71 *72 * @return array CSS style handles.73 */74 public function get_style_depends() {75 return array(76 'premium-addons',77 );78 }79 /**80 * Retrieve Widget Dependent JS.81 *82 * @since 1.0.083 * @access public84 *85 * @return array JS script handles.86 */87 public function get_script_depends() {88 return array(89 'elementor-waypoints',90 'lottie-js',91 'premium-addons',92 );93 }94 /**95 * Retrieve Widget Keywords.96 *97 * @since 1.0.098 * @access public99 *100 * @return string Widget keywords.101 */102 public function get_keywords() {103 return array( 'circle', 'chart', 'line', 'graph', 'percent' );104 }105 /**106 * Retrieve Widget Support URL.107 *108 * @access public109 *110 * @return string support URL.111 */112 public function get_custom_help_url() {113 return 'https://premiumaddons.com/support/';114 }115 /**116 * Register Progress Bar controls.117 *118 * @since 1.0.0119 * @access protected120 */121 protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore122 $this->start_controls_section(123 'premium_progressbar_labels',124 array(125 'label' => __( 'Progress Bar Settings', 'premium-addons-for-elementor' ),126 )127 );128 $this->add_control(129 'layout_type',130 array(131 'label' => __( 'Type', 'premium-addons-for-elementor' ),132 'type' => Controls_Manager::SELECT,133 'options' => array(134 'line' => __( 'Line', 'premium-addons-for-elementor' ),135 'circle' => __( 'Circle', 'premium-addons-for-elementor' ),136 'dots' => __( 'Dots', 'premium-addons-for-elementor' ),137 ),138 'default' => 'line',139 'label_block' => true,140 )141 );142 $this->add_responsive_control(143 'dot_size',144 array(145 'label' => __( 'Dot Size', 'premium-addons-for-elementor' ),146 'type' => Controls_Manager::SLIDER,147 'range' => array(148 'px' => array(149 'min' => 1,150 'max' => 60,151 ),152 ),153 'default' => array(154 'size' => 25,155 'unit' => 'px',156 ),157 'condition' => array(158 'layout_type' => 'dots',159 ),160 'render_type' => 'template',161 'selectors' => array(162 '{{WRAPPER}} .progress-segment' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',163 ),164 )165 );166 $this->add_responsive_control(167 'dot_spacing',168 array(169 'label' => __( 'Spacing', 'premium-addons-for-elementor' ),170 'type' => Controls_Manager::SLIDER,171 'range' => array(172 'px' => array(173 'min' => 1,174 'max' => 10,175 ),176 ),177 'default' => array(178 'size' => 8,179 'unit' => 'px',180 ),181 'condition' => array(182 'layout_type' => 'dots',183 ),184 'render_type' => 'template',185 'selectors' => array(186 '{{WRAPPER}} .progress-segment:not(:first-child):not(:last-child)' => 'margin-right: calc( {{SIZE}}{{UNIT}}/2 ); margin-left: calc( {{SIZE}}{{UNIT}}/2 )',187 '{{WRAPPER}} .progress-segment:first-child' => 'margin-right: calc( {{SIZE}}{{UNIT}}/2 )',188 '{{WRAPPER}} .progress-segment:last-child' => 'margin-left: calc( {{SIZE}}{{UNIT}}/2 )',189 ),190 )191 );192 $this->add_control(193 'circle_size',194 array(195 'label' => __( 'Size', 'premium-addons-for-elementor' ),196 'type' => Controls_Manager::SLIDER,197 'range' => array(198 'px' => array(199 'min' => 50,200 'max' => 500,201 'step' => 1,202 ),203 ),204 'default' => array(205 'size' => 200,206 ),207 'selectors' => array(208 '{{WRAPPER}} .premium-progressbar-circle-wrap' => 'width: {{SIZE}}px; height: {{SIZE}}px',209 ),210 'condition' => array(211 'layout_type' => 'circle',212 ),213 )214 );215 $this->add_control(216 'premium_progressbar_select_label',217 array(218 'label' => __( 'Labels', 'premium-addons-for-elementor' ),219 'type' => Controls_Manager::SELECT,220 'default' => 'left_right_labels',221 'options' => array(222 'left_right_labels' => __( 'Left & Right Labels', 'premium-addons-for-elementor' ),223 'more_labels' => __( 'Multiple Labels', 'premium-addons-for-elementor' ),224 ),225 'label_block' => true,226 'condition' => array(227 'layout_type!' => 'circle',228 ),229 )230 );231 $this->add_control(232 'premium_progressbar_left_label',233 array(234 'label' => __( 'Title', 'premium-addons-for-elementor' ),235 'type' => Controls_Manager::TEXT,236 'dynamic' => array( 'active' => true ),237 'default' => __( 'My Skill', 'premium-addons-for-elementor' ),238 'label_block' => true,239 'condition' => array(240 'premium_progressbar_select_label' => 'left_right_labels',241 ),242 )243 );244 $this->add_control(245 'premium_progressbar_right_label',246 array(247 'label' => __( 'Percentage', 'premium-addons-for-elementor' ),248 'type' => Controls_Manager::TEXT,249 'dynamic' => array( 'active' => true ),250 'default' => __( '50%', 'premium-addons-for-elementor' ),251 'label_block' => true,252 'condition' => array(253 'premium_progressbar_select_label' => 'left_right_labels',254 'layout_type!' => 'circle',255 ),256 )257 );258 $this->add_control(259 'icon_type',260 array(261 'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),262 'type' => Controls_Manager::SELECT,263 'options' => array(264 'icon' => __( 'Icon', 'premium-addons-for-elementor' ),265 'image' => __( 'Custom Image', 'premium-addons-for-elementor' ),266 'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),267 ),268 'default' => 'icon',269 'condition' => array(270 'layout_type' => 'circle',271 ),272 )273 );274 $this->add_control(275 'icon_select',276 array(277 'label' => __( 'Select an Icon', 'premium-addons-for-elementor' ),278 'type' => Controls_Manager::ICONS,279 'condition' => array(280 'icon_type' => 'icon',281 'layout_type' => 'circle',282 ),283 )284 );285 $this->add_control(286 'image_upload',287 array(288 'label' => __( 'Upload Image', 'premium-addons-for-elementor' ),289 'type' => Controls_Manager::MEDIA,290 'default' => array(291 'url' => Utils::get_placeholder_image_src(),292 ),293 'condition' => array(294 'icon_type' => 'image',295 'layout_type' => 'circle',296 ),297 )298 );299 $this->add_control(300 'lottie_url',301 array(302 'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),303 'type' => Controls_Manager::TEXT,304 'dynamic' => array( 'active' => true ),305 'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',306 'label_block' => true,307 'condition' => array(308 'layout_type' => 'circle',309 'icon_type' => 'animation',310 ),311 )312 );313 $this->add_control(314 'lottie_loop',315 array(316 'label' => __( 'Loop', 'premium-addons-for-elementor' ),317 'type' => Controls_Manager::SWITCHER,318 'return_value' => 'true',319 'default' => 'true',320 'condition' => array(321 'layout_type' => 'circle',322 'icon_type' => 'animation',323 ),324 )325 );326 $this->add_control(327 'lottie_reverse',328 array(329 'label' => __( 'Reverse', 'premium-addons-for-elementor' ),330 'type' => Controls_Manager::SWITCHER,331 'return_value' => 'true',332 'condition' => array(333 'layout_type' => 'circle',334 'icon_type' => 'animation',335 ),336 )337 );338 $this->add_responsive_control(339 'icon_size',340 array(341 'label' => __( 'Icon Size', 'premium-addons-for-elementor' ),342 'type' => Controls_Manager::SLIDER,343 'condition' => array(344 'layout_type' => 'circle',345 ),346 'default' => array(347 'unit' => 'px',348 'size' => 30,349 ),350 'selectors' => array(351 '{{WRAPPER}} .premium-progressbar-circle-content i' => 'font-size: {{SIZE}}px',352 '{{WRAPPER}} .premium-progressbar-circle-content svg, {{WRAPPER}} .premium-progressbar-circle-content img' => 'width: {{SIZE}}px !important; height: {{SIZE}}px !important',353 ),354 )355 );356 $this->add_control(357 'show_percentage_value',358 array(359 'label' => __( 'Show Percentage Value', 'premium-addons-for-elementor' ),360 'type' => Controls_Manager::SWITCHER,361 'default' => 'yes',362 'condition' => array(363 'layout_type' => 'circle',364 ),365 )366 );367 $repeater = new REPEATER();368 $repeater->add_control(369 'text',370 array(371 'label' => __( 'Label', 'premium-addons-for-elementor' ),372 'type' => Controls_Manager::TEXT,373 'dynamic' => array( 'active' => true ),374 'label_block' => true,375 'placeholder' => __( 'label', 'premium-addons-for-elementor' ),376 'default' => __( 'label', 'premium-addons-for-elementor' ),377 )378 );379 $repeater->add_control(380 'number',381 array(382 'label' => __( 'Percentage', 'premium-addons-for-elementor' ),383 'dynamic' => array( 'active' => true ),384 'type' => Controls_Manager::TEXT,385 'default' => 50,386 )387 );388 $this->add_control(389 'premium_progressbar_multiple_label',390 array(391 'label' => __( 'Label', 'premium-addons-for-elementor' ),392 'type' => Controls_Manager::REPEATER,393 'default' => array(394 array(395 'text' => __( 'Label', 'premium-addons-for-elementor' ),396 'number' => 50,397 ),398 ),399 'fields' => $repeater->get_controls(),400 'condition' => array(401 'premium_progressbar_select_label' => 'more_labels',402 'layout_type!' => 'circle',403 ),404 )405 );406 $this->add_control(407 'premium_progress_bar_space_percentage_switcher',408 array(409 'label' => __( 'Enable Percentage', 'premium-addons-for-elementor' ),410 'type' => Controls_Manager::SWITCHER,411 'default' => 'yes',412 'description' => __( 'Enable percentage for labels', 'premium-addons-for-elementor' ),413 'condition' => array(414 'premium_progressbar_select_label' => 'more_labels',415 'layout_type!' => 'circle',416 ),417 )418 );419 $this->add_control(420 'premium_progressbar_select_label_icon',421 array(422 'label' => __( 'Labels Indicator', 'premium-addons-for-elementor' ),423 'type' => Controls_Manager::SELECT,424 'default' => 'line_pin',425 'options' => array(426 '' => __( 'None', 'premium-addons-for-elementor' ),427 'line_pin' => __( 'Pin', 'premium-addons-for-elementor' ),428 'arrow' => __( 'Arrow', 'premium-addons-for-elementor' ),429 ),430 'condition' => array(431 'premium_progressbar_select_label' => 'more_labels',432 'layout_type!' => 'circle',433 ),434 )435 );436 $this->add_control(437 'premium_progressbar_more_labels_align',438 array(439 'label' => __( 'Labels Alignment', 'premuim-addons-for-elementor' ),440 'type' => Controls_Manager::CHOOSE,441 'options' => array(442 'left' => array(443 'title' => __( 'Left', 'premium-addons-for-elementor' ),444 'icon' => 'eicon-text-align-left',445 ),446 'center' => array(447 'title' => __( 'Center', 'premium-addons-for-elementor' ),448 'icon' => 'eicon-text-align-center',449 ),450 'right' => array(451 'title' => __( 'Right', 'premium-addons-for-elementor' ),452 'icon' => 'eicon-text-align-right',453 ),454 ),455 'default' => 'center',456 'condition' => array(457 'premium_progressbar_select_label' => 'more_labels',458 'layout_type!' => 'circle',459 ),460 )461 );462 $this->add_control(463 'premium_progressbar_progress_percentage',464 array(465 'label' => __( 'Value', 'premium-addons-for-elementor' ),466 'type' => Controls_Manager::TEXT,467 'dynamic' => array( 'active' => true ),468 'default' => 50,469 )470 );471 $this->add_control(472 'premium_progressbar_progress_style',473 array(474 'label' => __( 'Style', 'premium-addons-for-elementor' ),475 'type' => Controls_Manager::SELECT,476 'default' => 'solid',477 'options' => array(478 'solid' => __( 'Solid', 'premium-addons-for-elementor' ),479 'stripped' => __( 'Striped', 'premium-addons-for-elementor' ),480 'gradient' => __( 'Animated Gradient', 'premium-addons-for-elementor' ),481 ),482 'condition' => array(483 'layout_type' => 'line',484 ),485 )486 );487 $this->add_control(488 'premium_progressbar_speed',489 array(490 'label' => __( 'Speed (milliseconds)', 'premium-addons-for-elementor' ),491 'type' => Controls_Manager::NUMBER,492 )493 );494 $this->add_control(495 'premium_progressbar_progress_animation',496 array(497 'label' => __( 'Animated', 'premium-addons-for-elementor' ),498 'type' => Controls_Manager::SWITCHER,499 'condition' => array(500 'premium_progressbar_progress_style' => 'stripped',501 'layout_type' => 'line',502 ),503 )504 );505 $this->add_control(506 'gradient_colors',507 array(508 'label' => __( 'Gradient Colors', 'premium-addons-for-elementor' ),509 'type' => Controls_Manager::TEXT,510 'description' => __( 'Enter Colors separated with \' , \'.', 'premium-addons-for-elementor' ),511 'default' => '#6EC1E4,#54595F',512 'label_block' => true,513 'condition' => array(514 'layout_type' => 'line',515 'premium_progressbar_progress_style' => 'gradient',516 ),517 )518 );519 $this->end_controls_section();520 $this->start_controls_section(521 'section_pa_docs',522 array(523 'label' => __( 'Helpful Documentations', 'premium-addons-for-elementor' ),524 )525 );526 $doc1_url = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/docs/premium-progress-bar-widget/', 'editor-page', 'wp-editor', 'get-support' );527 $this->add_control(528 'doc_1',529 array(530 'type' => Controls_Manager::RAW_HTML,531 'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc1_url, __( 'Gettings started »', 'premium-addons-for-elementor' ) ),532 'content_classes' => 'editor-pa-doc',533 )534 );535 $this->end_controls_section();536 $this->start_controls_section(537 'premium_progressbar_progress_bar_settings',538 array(539 'label' => __( 'Progress Bar', 'premium-addons-for-elementor' ),540 'tab' => Controls_Manager::TAB_STYLE,541 )542 );543 $this->add_control(544 'premium_progressbar_progress_bar_height',545 array(546 'label' => __( 'Height', 'premium-addons-for-elementor' ),547 'type' => Controls_Manager::SLIDER,548 'default' => array(549 'size' => 25,550 ),551 'label_block' => true,552 'selectors' => array(553 '{{WRAPPER}} .premium-progressbar-bar-wrap, {{WRAPPER}} .premium-progressbar-bar' => 'height: {{SIZE}}px;',554 ),555 'condition' => array(556 'layout_type' => 'line',557 ),558 )559 );560 $this->add_control(561 'premium_progressbar_progress_bar_radius',562 array(563 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),564 'type' => Controls_Manager::SLIDER,565 'size_units' => array( 'px', '%', 'em' ),566 'range' => array(567 'px' => array(568 'min' => 0,569 'max' => 60,570 ),571 ),572 'selectors' => array(573 '{{WRAPPER}} .premium-progressbar-bar-wrap, {{WRAPPER}} .premium-progressbar-bar, {{WRAPPER}} .progress-segment' => 'border-radius: {{SIZE}}{{UNIT}};',574 ),575 'condition' => array(576 'layout_type!' => 'circle',577 ),578 )579 );580 $this->add_control(581 'circle_border_width',582 array(583 'label' => __( 'Border Width', 'premium-addons-for-elementor' ),584 'type' => Controls_Manager::SLIDER,585 'selectors' => array(586 '{{WRAPPER}} .premium-progressbar-circle-base' => 'border-width: {{SIZE}}{{UNIT}}',587 '{{WRAPPER}} .premium-progressbar-circle div' => 'border-width: {{SIZE}}{{UNIT}}',588 ),589 'condition' => array(590 'layout_type' => 'circle',591 ),592 )593 );594 $this->add_control(595 'circle_base_border_color',596 array(597 'label' => __( 'Border Color', 'premium-addons-for-elementor' ),598 'type' => Controls_Manager::COLOR,599 'global' => array(600 'default' => Global_Colors::COLOR_PRIMARY,601 ),602 'selectors' => array(603 '{{WRAPPER}} .premium-progressbar-circle-base' => 'border-color: {{VALUE}};',604 ),605 'condition' => array(606 'layout_type' => 'circle',607 ),608 )609 );610 $this->add_control(611 'fill_colors_title',612 array(613 'label' => __( 'Fill', 'premium-addons-for-elementor' ),614 'type' => Controls_Manager::HEADING,615 )616 );617 $this->add_group_control(618 Group_Control_Background::get_type(),619 array(620 'name' => 'premium_progressbar_progress_color',621 'types' => array( 'classic', 'gradient' ),622 'selector' => '{{WRAPPER}} .premium-progressbar-bar, {{WRAPPER}} .segment-inner',623 'condition' => array(624 'layout_type!' => 'circle',625 ),626 )627 );628 $this->add_control(629 'circle_fill_color',630 array(631 'label' => __( 'Select Color', 'premium-addons-for-elementor' ),632 'type' => Controls_Manager::COLOR,633 'global' => array(634 'default' => Global_Colors::COLOR_SECONDARY,635 ),636 'condition' => array(637 'layout_type' => 'circle',638 ),639 'selectors' => array(640 '{{WRAPPER}} .premium-progressbar-circle div' => 'border-color: {{VALUE}};',641 ),642 )643 );644 $this->add_control(645 'base_colors_title',646 array(647 'label' => __( 'Base', 'premium-addons-for-elementor' ),648 'type' => Controls_Manager::HEADING,649 )650 );651 $this->add_group_control(652 Group_Control_Background::get_type(),653 array(654 'name' => 'premium_progressbar_background',655 'types' => array( 'classic', 'gradient' ),656 'selector' => '{{WRAPPER}} .premium-progressbar-bar-wrap:not(.premium-progressbar-dots), {{WRAPPER}} .premium-progressbar-circle-base, {{WRAPPER}} .progress-segment',657 )658 );659 $this->add_responsive_control(660 'premium_progressbar_container_margin',661 array(662 'label' => __( 'Margin', 'premium-addons-for-elementor' ),663 'type' => Controls_Manager::DIMENSIONS,664 'size_units' => array( 'px', 'em', '%' ),665 'selectors' => array(666 '{{WRAPPER}} .premium-progressbar-bar-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',667 ),668 'condition' => array(669 'layout_type!' => 'circle',670 ),671 )672 );673 $this->end_controls_section();674 $this->start_controls_section(675 'premium_progressbar_labels_section',676 array(677 'label' => __( 'Labels', 'premium-addons-for-elementor' ),678 'tab' => Controls_Manager::TAB_STYLE,679 'condition' => array(680 'premium_progressbar_select_label' => 'left_right_labels',681 ),682 )683 );684 $this->add_control(685 'premium_progressbar_left_label_hint',686 array(687 'label' => __( 'Title', 'premium-addons-for-elementor' ),688 'type' => Controls_Manager::HEADING,689 )690 );691 $this->add_control(692 'premium_progressbar_left_label_color',693 array(694 'label' => __( 'Color', 'premium-addons-for-elementor' ),695 'type' => Controls_Manager::COLOR,696 'global' => array(697 'default' => Global_Colors::COLOR_PRIMARY,698 ),699 'selectors' => array(700 '{{WRAPPER}} .premium-progressbar-left-label' => 'color: {{VALUE}};',701 ),702 )703 );704 $this->add_group_control(705 Group_Control_Typography::get_type(),706 array(707 'name' => 'left_label_typography',708 'global' => array(709 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,710 ),711 'selector' => '{{WRAPPER}} .premium-progressbar-left-label',712 )713 );714 $this->add_responsive_control(715 'premium_progressbar_left_label_margin',716 array(717 'label' => __( 'Margin', 'premium-addons-for-elementor' ),718 'type' => Controls_Manager::DIMENSIONS,719 'size_units' => array( 'px', 'em', '%' ),720 'selectors' => array(721 '{{WRAPPER}} .premium-progressbar-left-label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',722 ),723 )724 );725 $this->add_control(726 'premium_progressbar_right_label_hint',727 array(728 'label' => __( 'Percentage', 'premium-addons-for-elementor' ),729 'type' => Controls_Manager::HEADING,730 'separator' => 'before',731 )732 );733 $this->add_control(734 'premium_progressbar_right_label_color',735 array(736 'label' => __( 'Color', 'premium-addons-for-elementor' ),737 'type' => Controls_Manager::COLOR,738 'global' => array(739 'default' => Global_Colors::COLOR_PRIMARY,740 ),741 'selectors' => array(742 '{{WRAPPER}} .premium-progressbar-right-label' => 'color: {{VALUE}};',743 ),744 )745 );746 $this->add_group_control(747 Group_Control_Typography::get_type(),748 array(749 'name' => 'right_label_typography',750 'global' => array(751 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,752 ),753 'selector' => '{{WRAPPER}} .premium-progressbar-right-label',754 )755 );756 $this->add_responsive_control(757 'premium_progressbar_right_label_margin',758 array(759 'label' => __( 'Margin', 'premium-addons-for-elementor' ),760 'type' => Controls_Manager::DIMENSIONS,761 'size_units' => array( 'px', 'em', '%' ),762 'selectors' => array(763 '{{WRAPPER}} .premium-progressbar-right-label' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',764 ),765 )766 );767 $this->end_controls_section();768 $this->start_controls_section(769 'premium_progressbar_multiple_labels_section',770 array(771 'label' => __( 'Multiple Labels', 'premium-addons-for-elementor' ),772 'tab' => Controls_Manager::TAB_STYLE,773 'condition' => array(774 'premium_progressbar_select_label' => 'more_labels',775 ),776 )777 );778 $this->add_control(779 'premium_progressbar_multiple_label_color',780 array(781 'label' => __( 'Labels\' Color', 'premium-addons-for-elementor' ),782 'type' => Controls_Manager::COLOR,783 'global' => array(784 'default' => Global_Colors::COLOR_PRIMARY,785 ),786 'selectors' => array(787 '{{WRAPPER}} .premium-progressbar-center-label' => 'color: {{VALUE}};',788 ),789 )790 );791 $this->add_group_control(792 Group_Control_Typography::get_type(),793 array(794 'label' => __( 'Labels\' Typography', 'premium-addons-for-elementor' ),795 'name' => 'more_label_typography',796 'global' => array(797 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,798 ),799 'selector' => '{{WRAPPER}} .premium-progressbar-center-label',800 )801 );802 $this->add_control(803 'premium_progressbar_value_label_color',804 array(805 'label' => __( 'Percentage Color', 'premium-addons-for-elementor' ),806 'type' => Controls_Manager::COLOR,807 'global' => array(808 'default' => Global_Colors::COLOR_PRIMARY,809 ),810 'condition' => array(811 'premium_progress_bar_space_percentage_switcher' => 'yes',812 ),813 'selectors' => array(814 '{{WRAPPER}} .premium-progressbar-percentage' => 'color: {{VALUE}};',815 ),816 )817 );818 $this->add_group_control(819 Group_Control_Typography::get_type(),820 array(821 'label' => __( 'Percentage Typography', 'premium-addons-for-elementor' ),822 'name' => 'percentage_typography',823 'condition' => array(824 'premium_progress_bar_space_percentage_switcher' => 'yes',825 ),826 'global' => array(827 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,828 ),829 'selector' => '{{WRAPPER}} .premium-progressbar-percentage',830 )831 );832 $this->end_controls_section();833 $this->start_controls_section(834 'premium_progressbar_multiple_labels_arrow_section',835 array(836 'label' => __( 'Arrow', 'premium-addons-for-elementor' ),837 'tab' => Controls_Manager::TAB_STYLE,838 'condition' => array(839 'premium_progressbar_select_label' => 'more_labels',840 'premium_progressbar_select_label_icon' => 'arrow',841 ),842 )843 );844 $this->add_control(845 'premium_progressbar_arrow_color',846 array(847 'label' => __( 'Color', 'premium_elementor' ),848 'type' => Controls_Manager::COLOR,849 'global' => array(850 'default' => Global_Colors::COLOR_PRIMARY,851 ),852 'condition' => array(853 'premium_progressbar_select_label_icon' => 'arrow',854 ),855 'selectors' => array(856 '{{WRAPPER}} .premium-progressbar-arrow' => 'color: {{VALUE}}',857 ),858 )859 );860 $this->add_responsive_control(861 'premium_arrow_size',862 array(863 'label' => __( 'Size', 'premium-addons-for-elementor' ),864 'type' => Controls_Manager::SLIDER,865 'size_units' => array( 'px', 'em' ),866 'condition' => array(867 'premium_progressbar_select_label_icon' => 'arrow',868 ),869 'selectors' => array(870 '{{WRAPPER}} .premium-progressbar-arrow' => 'border-width: {{SIZE}}{{UNIT}};',871 ),872 )873 );874 $this->end_controls_section();875 $this->start_controls_section(876 'premium_progressbar_multiple_labels_pin_section',877 array(878 'label' => __( 'Indicator', 'premium-addons-for-elementor' ),879 'tab' => Controls_Manager::TAB_STYLE,880 'condition' => array(881 'premium_progressbar_select_label' => 'more_labels',882 'premium_progressbar_select_label_icon' => 'line_pin',883 ),884 )885 );886 $this->add_control(887 'premium_progressbar_line_pin_color',888 array(889 'label' => __( 'Color', 'premium-addons-for-elementor' ),890 'type' => Controls_Manager::COLOR,891 'global' => array(892 'default' => Global_Colors::COLOR_SECONDARY,893 ),894 'condition' => array(895 'premium_progressbar_select_label_icon' => 'line_pin',896 ),897 'selectors' => array(898 '{{WRAPPER}} .premium-progressbar-pin' => 'border-color: {{VALUE}};',899 ),900 )901 );902 $this->add_responsive_control(903 'premium_pin_size',904 array(905 'label' => __( 'Size', 'premium-addons-for-elementor' ),906 'type' => Controls_Manager::SLIDER,907 'size_units' => array( 'px', 'em' ),908 'condition' => array(909 'premium_progressbar_select_label_icon' => 'line_pin',910 ),911 'selectors' => array(912 '{{WRAPPER}} .premium-progressbar-pin' => 'border-left-width: {{SIZE}}{{UNIT}};',913 ),914 )915 );916 $this->add_responsive_control(917 'premium_pin_height',918 array(919 'label' => __( 'Height', 'premium-addons-for-elementor' ),920 'type' => Controls_Manager::SLIDER,921 'size_units' => array( 'px', 'em' ),922 'condition' => array(923 'premium_progressbar_select_label_icon' => 'line_pin',924 ),925 'selectors' => array(926 '{{WRAPPER}} .premium-progressbar-pin' => 'height: {{SIZE}}{{UNIT}};',927 ),928 )929 );930 $this->end_controls_section();931 $this->start_controls_section(932 'icon_style',933 array(934 'label' => __( 'Icon', 'premium-addons-for-elementor' ),935 'tab' => Controls_Manager::TAB_STYLE,936 'condition' => array(937 'layout_type' => 'circle',938 ),939 )940 );941 $this->add_control(942 'icon_color',943 array(944 'label' => __( 'Color', 'premium-addons-for-elementor' ),945 'type' => Controls_Manager::COLOR,946 'global' => array(947 'default' => Global_Colors::COLOR_PRIMARY,948 ),949 'selectors' => array(950 '{{WRAPPER}} .premium-progressbar-circle-icon' => 'color: {{VALUE}}',951 '{{WRAPPER}} .premium-progressbar-circle-content svg' => 'fill: {{VALUE}}; color: {{VALUE}}',952 ),953 'condition' => array(954 'icon_type' => 'icon',955 ),956 )957 );958 $this->add_control(959 'icon_background_color',960 array(961 'label' => __( 'Background Color', 'premium-addons-for-elementor' ),962 'type' => Controls_Manager::COLOR,963 'selectors' => array(964 '{{WRAPPER}} .premium-progressbar-circle-icon, {{WRAPPER}} .premium-progressbar-circle-content svg' => 'background-color: {{VALUE}};',965 ),966 'condition' => array(967 'icon_type!' => 'image',968 ),969 )970 );971 $this->add_group_control(972 Group_Control_Border::get_type(),973 array(974 'name' => 'icon_border',975 'selector' => '{{WRAPPER}} .premium-progressbar-circle-icon, {{WRAPPER}} .premium-progressbar-circle-content svg',976 )977 );978 $this->add_responsive_control(979 'icon_border_radius',980 array(981 'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),982 'type' => Controls_Manager::DIMENSIONS,983 'size_units' => array( 'px', 'em', '%' ),984 'selectors' => array(985 '{{WRAPPER}} .premium-progressbar-circle-icon, {{WRAPPER}} .premium-progressbar-circle-content svg' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',986 ),987 )988 );989 $this->add_responsive_control(990 'icon_padding',991 array(992 'label' => __( 'Padding', 'premium-addons-for-elementor' ),993 'type' => Controls_Manager::DIMENSIONS,994 'size_units' => array( 'px', 'em', '%' ),995 'selectors' => array(996 '{{WRAPPER}} .premium-progressbar-circle-icon, {{WRAPPER}} .premium-progressbar-circle-content svg' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',997 ),998 )999 );1000 $this->end_controls_section();1001 }1002 /**1003 * Render Progress Bar widget output on the frontend.1004 *1005 * Written in PHP and used to generate the final HTML.1006 *1007 * @since 1.0.01008 * @access protected1009 */1010 protected function render() {1011 $settings = $this->get_settings_for_display();1012 $this->add_inline_editing_attributes( 'premium_progressbar_left_label' );1013 $this->add_inline_editing_attributes( 'premium_progressbar_right_label' );1014 $length = isset( $settings['premium_progressbar_progress_percentage']['size'] ) ? $settings['premium_progressbar_progress_percentage']['size'] : $settings['premium_progressbar_progress_percentage'];1015 $style = $settings['premium_progressbar_progress_style'];1016 $type = $settings['layout_type'];1017 $progressbar_settings = array(1018 'progress_length' => $length,1019 'speed' => ! empty( $settings['premium_progressbar_speed'] ) ? $settings['premium_progressbar_speed'] : 1000,1020 'type' => $type,1021 );1022 if ( 'dots' === $type ) {1023 $progressbar_settings['dot'] = $settings['dot_size']['size'];1024 $progressbar_settings['spacing'] = $settings['dot_spacing']['size'];1025 }1026 $this->add_render_attribute( 'progressbar', 'class', 'premium-progressbar-container' );1027 if ( 'stripped' === $style ) {1028 $this->add_render_attribute( 'progressbar', 'class', 'premium-progressbar-striped' );1029 } elseif ( 'gradient' === $style ) {1030 $this->add_render_attribute( 'progressbar', 'class', 'premium-progressbar-gradient' );1031 $progressbar_settings['gradient'] = $settings['gradient_colors'];1032 }1033 if ( 'yes' === $settings['premium_progressbar_progress_animation'] ) {1034 $this->add_render_attribute( 'progressbar', 'class', 'premium-progressbar-active' );1035 }1036 $this->add_render_attribute( 'progressbar', 'data-settings', wp_json_encode( $progressbar_settings ) );1037 if ( 'circle' !== $type ) {1038 $this->add_render_attribute( 'wrap', 'class', 'premium-progressbar-bar-wrap' );1039 if ( 'dots' === $type ) {1040 $this->add_render_attribute( 'wrap', 'class', 'premium-progressbar-dots' );1041 }1042 } else {1043 $this->add_render_attribute( 'wrap', 'class', 'premium-progressbar-circle-wrap' );1044 $icon_type = $settings['icon_type'];1045 if ( 'animation' === $icon_type ) {1046 $this->add_render_attribute(1047 'progress_lottie',1048 array(1049 'class' => array(1050 'premium-progressbar-circle-icon',1051 'premium-lottie-animation',1052 ),1053 'data-lottie-url' => $settings['lottie_url'],1054 'data-lottie-loop' => $settings['lottie_loop'],1055 'data-lottie-reverse' => $settings['lottie_reverse'],1056 )1057 );1058 }1059 }1060 ?>1061 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'progressbar' ) ); ?>>1062 <?php if ( 'left_right_labels' === $settings['premium_progressbar_select_label'] ) : ?>1063 <p class="premium-progressbar-left-label">1064 <span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_progressbar_left_label' ) ); ?>><?php echo wp_kses_post( $settings['premium_progressbar_left_label'] ); ?></span>1065 </p>1066 <p class="premium-progressbar-right-label">1067 <span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_progressbar_right_label' ) ); ?>><?php echo wp_kses_post( $settings['premium_progressbar_right_label'] ); ?></span>1068 </p>1069 <?php endif; ?>1070 <?php if ( 'more_labels' === $settings['premium_progressbar_select_label'] ) : ?>1071 <div class="premium-progressbar-container-label" style="position:relative;">1072 <?php1073 foreach ( $settings['premium_progressbar_multiple_label'] as $item ) {1074 if ( 'center' === $this->get_settings( 'premium_progressbar_more_labels_align' ) ) {1075 if ( 'yes' === $settings['premium_progress_bar_space_percentage_switcher'] ) {1076 if ( 'arrow' === $settings['premium_progressbar_select_label_icon'] ) {1077 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-45%);">' . $item['text'] . ' <span class="premium-progressbar-percentage">' . $item['number'] . '%</span></p><p class="premium-progressbar-arrow" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1078 } elseif ( 'line_pin' === $settings['premium_progressbar_select_label_icon'] ) {1079 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-45%);">' . $item['text'] . ' <span class="premium-progressbar-percentage">' . $item['number'] . '%</span></p><p class="premium-progressbar-pin" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1080 } else {1081 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-45%);">' . $item['text'] . ' <span class="premium-progressbar-percentage">' . $item['number'] . '%</span></p></div>';1082 }1083 } else {1084 if ( 'arrow' === $settings['premium_progressbar_select_label_icon'] ) {1085 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-45%);">' . $item['text'] . '</p><p class="premium-progressbar-arrow" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1086 } elseif ( 'line_pin' === $settings['premium_progressbar_select_label_icon'] ) {1087 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-45%)">' . $item['text'] . '</p><p class="premium-progressbar-pin" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1088 } else {1089 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-45%);">' . $item['text'] . '</p></div>';1090 }1091 }1092 } elseif ( 'left' === $this->get_settings( 'premium_progressbar_more_labels_align' ) ) {1093 if ( 'yes' === $settings['premium_progress_bar_space_percentage_switcher'] ) {1094 if ( 'arrow' === $settings['premium_progressbar_select_label_icon'] ) {1095 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-10%);">' . $item['text'] . ' <span class="premium-progressbar-percentage">' . $item['number'] . '%</span></p><p class="premium-progressbar-arrow" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1096 } elseif ( 'line_pin' === $settings['premium_progressbar_select_label_icon'] ) {1097 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-2%);">' . $item['text'] . ' <span class="premium-progressbar-percentage">' . $item['number'] . '%</span></p><p class="premium-progressbar-pin" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1098 } else {1099 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-2%);">' . $item['text'] . ' <span class="premium-progressbar-percentage">' . $item['number'] . '%</span></p></div>';1100 }1101 } else {1102 if ( 'arrow' === $settings['premium_progressbar_select_label_icon'] ) {1103 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-10%);">' . $item['text'] . '</p><p class="premium-progressbar-arrow" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1104 } elseif ( 'line_pin' === $settings['premium_progressbar_select_label_icon'] ) {1105 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-2%);">' . $item['text'] . '</p><p class="premium-progressbar-pin" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1106 } else {1107 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-2%);">' . $item['text'] . '</p></div>';1108 }1109 }1110 } else {1111 if ( 'yes' === $settings['premium_progress_bar_space_percentage_switcher'] ) {1112 if ( 'arrow' === $settings['premium_progressbar_select_label_icon'] ) {1113 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-82%);">' . $item['text'] . ' <span class="premium-progressbar-percentage">' . $item['number'] . '%</span></p><p class="premium-progressbar-arrow" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1114 } elseif ( 'line_pin' === $settings['premium_progressbar_select_label_icon'] ) {1115 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-95%);">' . $item['text'] . ' <span class="premium-progressbar-percentage">' . $item['number'] . '%</span></p><p class="premium-progressbar-pin" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1116 } else {1117 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-96%);">' . $item['text'] . ' <span class="premium-progressbar-percentage">' . $item['number'] . '%</span></p></div>';1118 }1119 } else {1120 if ( 'arrow' === $settings['premium_progressbar_select_label_icon'] ) {1121 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-71%);">' . $item['text'] . '</p><p class="premium-progressbar-arrow" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1122 } elseif ( 'line_pin' === $settings['premium_progressbar_select_label_icon'] ) {1123 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-97%);">' . $item['text'] . '</p><p class="premium-progressbar-pin" style="left:' . $item['number'] . '%; transform:translateX(50%);"></p></div>';1124 } else {1125 echo '<div class="premium-progressbar-multiple-label" style="left:' . $item['number'] . '%;"><p class = "premium-progressbar-center-label" style="transform:translateX(-96%);">' . $item['text'] . '</p></div>';1126 }1127 }1128 }1129 }1130 ?>1131 </div>1132 <?php endif; ?>1133 <div class="clearfix"></div>1134 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'wrap' ) ); ?>>1135 <?php if ( 'line' === $type ) : ?>1136 <div class="premium-progressbar-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100"></div>1137 <?php elseif ( 'circle' === $type ) : ?>1138 <div class="premium-progressbar-circle-base"></div>1139 <div class="premium-progressbar-circle">1140 <div class="premium-progressbar-circle-left"></div>1141 <div class="premium-progressbar-circle-right"></div>1142 </div>1143 <div class="premium-progressbar-circle-content">1144 <?php if ( ! empty( $settings['icon_select']['value'] ) || ! empty( $settings['image_upload']['url'] ) || ! empty( $settings['lottie_url'] ) ) : ?>1145 <?php1146 if ( 'icon' === $icon_type ) :1147 Icons_Manager::render_icon(1148 $settings['icon_select'],1149 array(1150 'class' => 'premium-progressbar-circle-icon',1151 'aria-hidden' => 'true',1152 )1153 );1154 elseif ( 'image' === $icon_type ) :1155 ?>1156 <img class="premium-progressbar-circle-icon" src="<?php echo esc_attr( $settings['image_upload']['url'] ); ?>">1157 <?php else : ?>1158 <div <?php echo wp_kses_post( $this->get_render_attribute_string( 'progress_lottie' ) ); ?>></div>1159 <?php endif; ?>1160 <?php endif; ?>1161 <p class="premium-progressbar-left-label">1162 <span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_progressbar_left_label' ) ); ?>>1163 <?php echo wp_kses_post( $settings['premium_progressbar_left_label'] ); ?>1164 </span>1165 </p>1166 <?php if ( 'yes' === $settings['show_percentage_value'] ) : ?>1167 <p class="premium-progressbar-right-label">1168 <span <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_progressbar_right_label' ) ); ?>>0%</span>1169 </p>1170 <?php endif; ?>1171 </div>1172 <?php endif; ?>1173 </div>1174 </div>1175 <?php1176 }1177}...

Full Screen

Full Screen

webform-progressbar.tpl.php

Source:webform-progressbar.tpl.php Github

copy

Full Screen

1<?php2/**3 * @file4 * Display the progress bar for multipage forms5 *6 * Available variables:7 * - $node: The webform node.8 * - $progressbar_page_number: TRUE if the actual page number should be9 * displayed.10 * - $progressbar_percent: TRUE if the percentage complete should be displayed.11 * - $progressbar_bar: TRUE if the bar should be displayed.12 * - $progressbar_pagebreak_labels: TRUE if the page break labels shoud be13 * displayed.14 * - $page_num: The current page number.15 * - $page_count: The total number of pages in this form.16 * - $page_labels: The labels for the pages. This typically includes a label for17 * the starting page (index 0), each page in the form based on page break18 * labels, and then the confirmation page (index number of pages + 1).19 * - $percent: The percentage complete.20 */21?>22<div class="webform-progressbar">23 <?php if ($progressbar_bar): ?>24 <div class="webform-progressbar-outer">25 <div class="webform-progressbar-inner" style="width: <?php print number_format($percent, 0); ?>%">&nbsp;</div>26 <?php for ($n = 1; $n <= $page_count; $n++): ?>27 <span class="webform-progressbar-page<?php if ($n < $page_num) { print ' completed'; }; ?><?php if ($n == $page_num) { print ' current'; }; ?>" style="<?php print ($GLOBALS['language']->direction == 0) ? 'left' : 'right'; ?>: <?php print number_format(($n - 1) / ($page_count - 1), 4) * 100; ?>%">28 <span class="webform-progressbar-page-number"><?php print $n; ?></span>29 <?php if ($progressbar_pagebreak_labels): ?>30 <span class="webform-progressbar-page-label">31 <?php print check_plain($page_labels[$n - 1]); ?>32 </span>33 <?php endif; ?>34 </span>35 <?php endfor; ?>36 </div>37 <?php endif; ?>38 <?php if ($progressbar_page_number): ?>39 <div class="webform-progressbar-number">40 <?php print t('Page @start of @end', array('@start' => $page_num, '@end' => $page_count)); ?>41 <?php if ($progressbar_percent): ?>42 <span class="webform-progressbar-number">43 (<?php print number_format($percent, 0); ?>%)44 </span>45 <?php endif; ?>46 </div>47 <?php endif; ?>48 <?php if (!$progressbar_page_number && $progressbar_percent): ?>49 <div class="webform-progressbar-number">50 <?php print number_format($percent, 0); ?>%51 </div>52 <?php endif; ?>53</div>...

Full Screen

Full Screen

progressBar

Using AI Code Generation

copy

Full Screen

1use atoum\atoum\scripts\runner;2use atoum\atoum\scripts\runner;3use atoum\atoum\scripts\runner;4use atoum\atoum\scripts\runner;5use atoum\atoum\scripts\runner;6use atoum\atoum\scripts\runner;7use atoum\atoum\scripts\runner;8use atoum\atoum\scripts\runner;9use atoum\atoum\scripts\runner;10use atoum\atoum\scripts\runner;11use atoum\atoum\scripts\runner;12use atoum\atoum\scripts\runner;13use atoum\atoum\scripts\runner;14use atoum\atoum\scripts\runner;15use atoum\atoum\scripts\runner;16use atoum\atoum\scripts\runner;

Full Screen

Full Screen

progressBar

Using AI Code Generation

copy

Full Screen

1$progressBar = new ProgressBar('Progress Bar', 100);2$progressBar->start();3for ($i = 0; $i < 100; $i++) {4 $progressBar->advance();5 sleep(1);6}7$progressBar->finish();8$progressBar = new ProgressBar('Progress Bar', 100);9$progressBar->start();10for ($i = 0; $i < 100; $i++) {11 $progressBar->advance();12 sleep(1);13}14$progressBar->finish();15$progressBar = new ProgressBar('Progress Bar', 100);16$progressBar->start();17for ($i = 0; $i < 100; $i++) {18 $progressBar->advance();19 sleep(1);20}21$progressBar->finish();22$progressBar = new ProgressBar('Progress Bar', 100);23$progressBar->start();24for ($i = 0; $i < 100; $i++) {25 $progressBar->advance();26 sleep(1);27}28$progressBar->finish();29$progressBar = new ProgressBar('Progress Bar', 100);30$progressBar->start();31for ($i = 0; $i < 100; $i++) {32 $progressBar->advance();33 sleep(1);34}35$progressBar->finish();36$progressBar = new ProgressBar('Progress Bar', 100);37$progressBar->start();38for ($i = 0; $i < 100; $i++) {39 $progressBar->advance();40 sleep(1);41}42$progressBar->finish();43$progressBar = new ProgressBar('Progress Bar', 100);44$progressBar->start();45for ($i = 0; $i < 100; $i++) {46 $progressBar->advance();47 sleep(1);48}49$progressBar->finish();

Full Screen

Full Screen

progressBar

Using AI Code Generation

copy

Full Screen

1require_once 'vendor/autoload.php';2use mageekguy\atoum\scripts\runner;3$runner = new runner();4$runner->addTestsFromDirectory(__DIR__ . '/tests/units');5$runner->run();6require_once 'vendor/autoload.php';7use mageekguy\atoum\scripts\runner;8$runner = new runner();9$runner->addTestsFromDirectory(__DIR__ . '/tests/units');10$runner->run();11require_once 'vendor/autoload.php';12use mageekguy\atoum\scripts\runner;13$runner = new runner();14$runner->addTestsFromDirectory(__DIR__ . '/tests/units');15$runner->run();16require_once 'vendor/autoload.php';17use mageekguy\atoum\scripts\runner;18$runner = new runner();19$runner->addTestsFromDirectory(__DIR__ . '/tests/units');20$runner->run();21require_once 'vendor/autoload.php';22use mageekguy\atoum\scripts\runner;23$runner = new runner();24$runner->addTestsFromDirectory(__DIR__ . '/tests/units');25$runner->run();26require_once 'vendor/autoload.php';27use mageekguy\atoum\scripts\runner;28$runner = new runner();29$runner->addTestsFromDirectory(__DIR__ . '/tests/units');30$runner->run();31require_once 'vendor/autoload.php';32use mageekguy\atoum\scripts\runner;

Full Screen

Full Screen

progressBar

Using AI Code Generation

copy

Full Screen

1require_once 'progressBar.php';2$progressBar = new progressBar(100);3for($i = 0; $i < 100; $i++)4{5 $progressBar->run($i);6}7require_once 'progressBar.php';8$progressBar = new progressBar(100);9for($i = 0; $i < 100; $i++)10{11 $progressBar->run($i);12}13require_once 'progressBar.php';14$progressBar = new progressBar(100);15for($i = 0; $i < 100; $i++)16{17 $progressBar->run($i);18}19require_once 'progressBar.php';20$progressBar = new progressBar(100);21for($i = 0; $i < 100; $i++)22{23 $progressBar->run($i);24}25require_once 'progressBar.php';26$progressBar = new progressBar(100);27for($i = 0; $i < 100; $i++)28{29 $progressBar->run($i);30}31require_once 'progressBar.php';32$progressBar = new progressBar(100);33for($i = 0; $i < 100; $i++)34{35 $progressBar->run($i);36}37require_once 'progressBar.php';38$progressBar = new progressBar(100);39for($i = 0; $i < 100; $i++)40{41 $progressBar->run($i);42}43require_once 'progressBar.php';44$progressBar = new progressBar(100);45for($i = 0; $i < 100; $i++)46{47 $progressBar->run($i);48}49require_once 'progressBar.php';

Full Screen

Full Screen

progressBar

Using AI Code Generation

copy

Full Screen

1$progressBar = new atoum\cli\progressBar();2$progressBar->init(100);3for($i=0; $i<=100; $i++){4 $progressBar->increment();5 sleep(1);6}7$progressBar->deinit();8$progressBar = new atoum\cli\progressBar();9$progressBar->init(100);10for($i=0; $i<=100; $i++){11 $progressBar->increment();12 sleep(1);13}14$progressBar->deinit();15$progressBar = new atoum\cli\progressBar();16$progressBar->init(100);17for($i=0; $i<=100; $i++){18 $progressBar->increment();19 sleep(1);20}21$progressBar->deinit();22$progressBar = new atoum\cli\progressBar();23$progressBar->init(100);24for($i=0; $i<=100; $i

Full Screen

Full Screen

progressBar

Using AI Code Generation

copy

Full Screen

1$progressBar = new atoum\cli\progressBar();2$progressBar->display();3$progressBar->increment();4$progressBar = new atoum\cli\progressBar();5$progressBar->display();6$progressBar->increment();7$progressBar = new atoum\cli\progressBar();8$progressBar->display();9$progressBar->increment();10$progressBar = new atoum\cli\progressBar();11$progressBar->display();12$progressBar->increment();13$progressBar = new atoum\cli\progressBar();14$progressBar->display();15$progressBar->increment();16$progressBar = new atoum\cli\progressBar();17$progressBar->display();18$progressBar->increment();19$progressBar = new atoum\cli\progressBar();20$progressBar->display();21$progressBar->increment();22$progressBar = new atoum\cli\progressBar();23$progressBar->display();24$progressBar->increment();

Full Screen

Full Screen

progressBar

Using AI Code Generation

copy

Full Screen

1use atoum\progressBar;2$progressBar = new progressBar();3$progressBar->setNumberOfSteps(10);4$progressBar->setNumberOfStepsToDisplay(10);5$progressBar->setNumberOfStepsToGoBack(1);6$progressBar->setNumberOfStepsToGoForward(1);7$progressBar->setWidth(80);8$progressBar->setCharacter('>');9$progressBar->setRemainingCharacter('-');10$progressBar->setCurrentCharacter('>');11$progressBar->setRemainingCurrentCharacter('-');12$progressBar->setPreviousCharacter('>');13$progressBar->setRemainingPreviousCharacter('-');14$progressBar->setNextCharacter('>');15$progressBar->setRemainingNextCharacter('-');16$progressBar->setFirstCharacter('>');17$progressBar->setRemainingFirstCharacter('-');18$progressBar->setLastCharacter('>');19$progressBar->setRemainingLastCharacter('-');20$progressBar->setFirstProgressBarCharacter('>');21$progressBar->setRemainingFirstProgressBarCharacter('-');22$progressBar->setLastProgressBarCharacter('>');23$progressBar->setRemainingLastProgressBarCharacter('-');

Full Screen

Full Screen

progressBar

Using AI Code Generation

copy

Full Screen

1include_once('atoum/progressBar.php');2include_once('atoum/progressBar.php');3include_once('atoum/progressBar.php');4include_once('atoum/progressBar.php');5include_once('atoum/progressBar.php');6include_once('atoum/progressBar.php');7include_once('atoum/progressBar.php');

Full Screen

Full Screen

progressBar

Using AI Code Generation

copy

Full Screen

1require_once 'vendor/autoload.php';2require_once 'ProgressBar.php';3$progressBar = new ProgressBar();4$progressBar->setIterations(100);5$progressBar->setWidth(50);6$progressBar->setMessage("Progress");7$progressBar->setCharacter("=");8$progressBar->setEmptyCharacter(" ");9$progressBar->setCharacter("=");10$progressBar->setEmptyCharacter(" ");11$progressBar->setCharacter("=");12$progressBar->setEmptyCharacter(" ");13$progressBar->setCharacter("=");14$progressBar->setEmptyCharacter(" ");15$progressBar->setCharacter("=");16$progressBar->setEmptyCharacter(" ");17$progressBar->setCharacter("=");18$progressBar->setEmptyCharacter(" ");19$progressBar->setCharacter("=");20$progressBar->setEmptyCharacter(" ");21$progressBar->setCharacter("=");22$progressBar->setEmptyCharacter(" ");23$progressBar->setCharacter("=");24$progressBar->setEmptyCharacter(" ");25$progressBar->setCharacter("=");26$progressBar->setEmptyCharacter(" ");27$progressBar->setCharacter("=");

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Atoum automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Run Selenium Automation Tests on LambdaTest Cloud Grid

Trigger Selenium automation tests on a cloud-based Grid of 3000+ real browsers and operating systems.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful