HEX
Server: nginx/1.24.0
System: Linux DGT-WORDPRESS-VM-SERVER 6.14.0-1014-azure #14~24.04.1-Ubuntu SMP Fri Oct 3 20:52:11 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.4.12
Disabled: NONE
Upload Files
File: /mnt/data/demo-doccurelanding-wp/wp-content/plugins/dreamslanding-widgets/widgets/class-journey.php
<?php
namespace Dreamslandingelementor\Widgets;

use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Repeater;

if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly

class DTS_journey extends Widget_Base {

    public function get_name() {
        return 'dreamslanding_elementor_journey';
    }

    public function get_title() {
        return __( 'DL Journey', 'dreamslanding_elementor' );
    }

    public function get_icon() {
        return 'eicon-time-line';
    }

    public function get_categories() {
        return [ 'dreamslandingelemetortheme' ];
    }

    protected function register_controls() {
        // Section header
        $this->start_controls_section(
            'section_header',
            [ 'label' => __( 'Section Header', 'dreamslanding_elementor' ) ]
        );
        $this->add_control(
            'section_title',
            [ 'label' => __( 'Title', 'dreamslanding_elementor' ), 'type' => Controls_Manager::TEXT, 'default' => "A Journey Through Doccure's Development" ]
        );
        $this->add_control(
            'section_desc',
            [ 'label' => __( 'Description', 'dreamslanding_elementor' ), 'type' => Controls_Manager::TEXTAREA, 'default' => 'Visual Timeline Implementation Note: Create an interactive horizontal timeline with dots/nodes for each milestone year. Each node should be clickable/tappable to reveal details. Mobile: Convert to vertical scrolling timeline.' ]
        );
        $this->end_controls_section();

        // Left column
        $this->start_controls_section(
            'section_left',
            [ 'label' => __( 'Left Roadmap Column', 'dreamslanding_elementor' ) ]
        );
        $this->add_control(
            'left_title',
            [ 'label' => __( 'Left Title', 'dreamslanding_elementor' ), 'type' => Controls_Manager::TEXT, 'default' => '2025-2027 - Future Roadmap' ]
        );
        $this->add_control(
            'left_subtitle',
            [ 'label' => __( 'Left Subtitle', 'dreamslanding_elementor' ), 'type' => Controls_Manager::TEXT, 'default' => 'Next Generation Healthcare Technology' ]
        );
        $bullet_rep = new Repeater();
        $bullet_rep->add_control(
            'text',
            [ 'label' => __( 'Bullet Text', 'dreamslanding_elementor' ), 'type' => Controls_Manager::TEXT, 'default' => 'AI-powered predictive health analytics' ]
        );
        $this->add_control(
            'left_bullets',
            [
                'label' => __( 'Left Bullets', 'dreamslanding_elementor' ),
                'type' => Controls_Manager::REPEATER,
                'fields' => $bullet_rep->get_controls(),
                'default' => [
                    [ 'text' => 'AI-powered predictive health analytics' ],
                    [ 'text' => 'Blockchain-based health records' ],
                    [ 'text' => 'Advanced telesurgery consultation' ],
                    [ 'text' => 'Wearable device integration expansion' ],
                    [ 'text' => 'Genomic data integration' ],
                    [ 'text' => 'Multi-language & multi-currency support' ],
                    [ 'text' => 'Research & clinical trials module' ],
                    [ 'text' => 'Target: 5,000+ healthcare providers globally' ],
                ],
                'title_field' => '{{{ text }}}',
            ]
        );
        $this->end_controls_section();

        // Journey items (years + details)
        $this->start_controls_section(
            'section_journey',
            [ 'label' => __( 'Journey Items', 'dreamslanding_elementor' ) ]
        );
        $rep = new Repeater();
        $rep->add_control(
            'year',
            [ 'label' => __( 'Year', 'dreamslanding_elementor' ), 'type' => Controls_Manager::TEXT, 'default' => '2025' ]
        );
        $rep->add_control(
            'arrow',
            [ 'label' => __( 'Arrow Image', 'dreamslanding_elementor' ), 'type' => Controls_Manager::MEDIA ]
        );
        $rep->add_control(
            'title',
            [ 'label' => __( 'Slide Title', 'dreamslanding_elementor' ), 'type' => Controls_Manager::TEXT, 'default' => 'IoT Integration & Rural Healthcare (2025)' ]
        );
        $subrep = new Repeater();
        $subrep->add_control(
            'point',
            [ 'label' => __( 'Point', 'dreamslanding_elementor' ), 'type' => Controls_Manager::TEXT, 'default' => 'AI-powered predictive health analytics' ]
        );
        $rep->add_control(
            'points',
            [
                'label' => __( 'Slide Points', 'dreamslanding_elementor' ),
                'type' => Controls_Manager::REPEATER,
                'fields' => $subrep->get_controls(),
                'default' => [
                    [ 'point' => 'AI-powered predictive health analytics' ],
                    [ 'point' => 'Blockchain-based health records' ],
                    [ 'point' => 'Advanced telesurgery consultation' ],
                    [ 'point' => 'Wearable device integration expansion' ],
                    [ 'point' => 'Genomic data integration' ],
                ],
                'title_field' => '{{{ point }}}',
            ]
        );
        $this->add_control(
            'items',
            [
                'label' => __( 'Journey Items', 'dreamslanding_elementor' ),
                'type' => Controls_Manager::REPEATER,
                'fields' => $rep->get_controls(),
                'default' => [
                    [ 'year' => '2025', 'title' => 'IoT Integration & Rural Healthcare (2025)' ],
                    [ 'year' => '2024', 'title' => 'IoT Integration & Rural Healthcare (2024)' ],
                    [ 'year' => '2023', 'title' => 'IoT Integration & Rural Healthcare (2023)' ],
                    [ 'year' => '2022', 'title' => 'IoT Integration & Rural Healthcare (2022)' ],
                    [ 'year' => '2021', 'title' => 'IoT Integration & Rural Healthcare (2021)' ],
                    [ 'year' => '2020', 'title' => 'IoT Integration & Rural Healthcare (2020)' ],
                    [ 'year' => '2019', 'title' => 'IoT Integration & Rural Healthcare (2019)' ],
                    [ 'year' => '2018', 'title' => 'IoT Integration & Rural Healthcare (2018)' ],
                    [ 'year' => '2017', 'title' => 'IoT Integration & Rural Healthcare (2017)' ],
                ],
                'title_field' => '{{{ year }}} — {{{ title }}}',
            ]
        );
        $this->end_controls_section();
    }

    protected function render() {
        $s = $this->get_settings_for_display();
        $title = isset($s['section_title']) ? $s['section_title'] : '';
        $desc = isset($s['section_desc']) ? $s['section_desc'] : '';
        $left_title = isset($s['left_title']) ? $s['left_title'] : '';
        $left_sub = isset($s['left_subtitle']) ? $s['left_subtitle'] : '';
        $left_bullets = isset($s['left_bullets']) && is_array($s['left_bullets']) ? $s['left_bullets'] : [];
        $items = isset($s['items']) && is_array($s['items']) ? $s['items'] : [];
        ?>
        <section class="section-journey">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <div class="section-header aos" data-aos="fade-up">
                            <?php if ($title) : ?><h2><?php echo esc_html($title); ?></h2><?php endif; ?>
                            <?php if ($desc) : ?><p><?php echo esc_html($desc); ?></p><?php endif; ?>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-4">
                        <div class="roadmap-s">
                            <?php if ($left_title) : ?><h3><?php echo esc_html($left_title); ?></h3><?php endif; ?>
                            <?php if ($left_sub) : ?><p><?php echo esc_html($left_sub); ?></p><?php endif; ?>
                            <?php if (!empty($left_bullets)) : ?>
                            <ul>
                                <?php foreach ($left_bullets as $b) : ?>
                                <li><i class="ti ti-circle-check-filled"></i><?php echo esc_html($b['text']); ?></li>
                                <?php endforeach; ?>
                            </ul>
                            <?php endif; ?>
                        </div>
                    </div>
                    <div class="col-md-8">
                        <div class="roadmap-e">
                            <div class="gallery-wrapper">
                                <div class="swiper thumbsSwiper">
                                    <div class="swiper-wrapper">
                                        <?php foreach ($items as $it) :
                                            $year = isset($it['year']) ? $it['year'] : '';
                                            $arrow = !empty($it['arrow']['url']) ? $it['arrow']['url'] : '';
                                        ?>
                                        <div class="swiper-slide"><?php echo esc_html($year); ?><?php if ($arrow) : ?><img src="<?php echo esc_url($arrow); ?>" alt="" />
                                            <?php else : ?>
                                                <img src="<?php echo esc_url(get_template_directory_uri()); ?>/assets/img/arrow.png" alt="" />
                                            <?php endif; ?></div>
                                        <?php endforeach; ?>
                                    </div>
                                </div>
                                <div class="swiper mainSwiper">
                                    <div class="swiper-wrapper">
                                        <?php foreach ($items as $it) :
                                            $st = isset($it['title']) ? $it['title'] : '';
                                            $pts = isset($it['points']) && is_array($it['points']) ? $it['points'] : [];
                                        ?>
                                        <div class="swiper-slide">
                                            <div class="roadmap-list">
                                                <?php if ($st) : ?><h3><?php echo esc_html($st); ?></h3><?php endif; ?>
                                                <?php if ($pts) : ?>
                                                <ul>
                                                    <?php foreach ($pts as $p) : ?>
                                                        <li><i class="ti ti-circle-check-filled"></i> <?php echo esc_html($p['point']); ?></li>
                                                    <?php endforeach; ?>
                                                </ul>
                                                <?php endif; ?>
                                            </div>
                                        </div>
                                        <?php endforeach; ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <?php
    }

    protected function content_template() {
        ?>
        <section class="section-journey">
            <div class="container">
                <div class="row">
                    <div class="col-md-12">
                        <div class="section-header aos" data-aos="fade-up">
                            <# if ( settings.section_title ) { #><h2>{{{ settings.section_title }}}</h2><# } #>
                            <# if ( settings.section_desc ) { #><p>{{{ settings.section_desc }}}</p><# } #>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-4">
                        <div class="roadmap-s">
                            <# if ( settings.left_title ) { #><h3>{{{ settings.left_title }}}</h3><# } #>
                            <# if ( settings.left_subtitle ) { #><p>{{{ settings.left_subtitle }}}</p><# } #>
                            <# if ( settings.left_bullets && settings.left_bullets.length ) { #>
                            <ul>
                                <# _.each( settings.left_bullets, function(b){ #>
                                    <li><i class="ti ti-circle-check-filled"></i>{{{ b.text }}}</li>
                                <# }); #>
                            </ul>
                            <# } #>
                        </div>
                    </div>
                    <div class="col-md-8">
                        <div class="roadmap-e">
                            <div class="gallery-wrapper">
                                <div class="swiper thumbsSwiper">
                                    <div class="swiper-wrapper">
                                        <# if ( settings.items && settings.items.length ) { #>
                                            <# _.each( settings.items, function(it){ #>
                                                <div class="swiper-slide">{{{ it.year }}}<# if ( it.arrow && it.arrow.url ) { #><img src="{{{ it.arrow.url }}}" alt="" /><# } #></div>
                                            <# }); #>
                                        <# } #>
                                    </div>
                                </div>
                                <div class="swiper mainSwiper">
                                    <div class="swiper-wrapper">
                                        <# if ( settings.items && settings.items.length ) { #>
                                            <# _.each( settings.items, function(it){ #>
                                                <div class="swiper-slide">
                                                    <div class="roadmap-list">
                                                        <# if ( it.title ) { #><h3>{{{ it.title }}}</h3><# } #>
                                                        <# if ( it.points && it.points.length ) { #>
                                                        <ul>
                                                            <# _.each( it.points, function(p){ #>
                                                                <li><i class="ti ti-circle-check-filled"></i> {{{ p.point }}}</li>
                                                            <# }); #>
                                                        </ul>
                                                        <# } #>
                                                    </div>
                                                </div>
                                            <# }); #>
                                        <# } #>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
        <?php
    }
}