Your IP : 216.73.216.0


Current Path : /home/goldnueh/netsetsolution.com/wp-content/plugins/zeinet-addon/includes/Widgets/
Upload File :
Current File : /home/goldnueh/netsetsolution.com/wp-content/plugins/zeinet-addon/includes/Widgets/Sponsors.php

<?php

namespace Layerdrops\Zeinet\Widgets;


class Sponsors extends \Elementor\Widget_Base
{
    public function get_name()
    {
        return 'zeinet-sponsors';
    }

    public function get_title()
    {
        return __('Sponsors', 'zeinet-addon');
    }

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

    public function get_categories()
    {
        return ['zeinet-category'];
    }

    protected function register_controls()
    {
        $this->start_controls_section(
            'layout_section',
            [
                'label' => __('Layout', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
            ]
        );

        $this->add_control(
            'layout_type',
            [
                'label' => __('Select Layout', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::SELECT2,
                'default' => 'layout_one',
                'options' => [
                    'layout_one' => __('Layout One', 'zeinet-addon'),
                    'layout_two' => __('Layout Two', 'zeinet-addon'),
                    'layout_three' => __('Layout Three', 'zeinet-addon'),
                    'layout_four' => __('Layout Four', 'zeinet-addon'),
                ]
            ]
        );

        $this->end_controls_section();

        $this->start_controls_section(
            'content_section',
            [
                'label' => __('Content', 'zeinet-addon'),
                'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
            ]
        );

        $sponsor_images = new \Elementor\Repeater();

        $sponsor_images->add_control(
            'image',
            [
                'label' => __('Add Image', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::MEDIA,
            ]
        );

        $sponsor_images->add_control(
            'link',
            [
                'label' => __('Add Link', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::TEXT,
            ]
        );


        $this->add_control(
            'sponsor_images',
            [
                'label' => __('Sponsor Items', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::REPEATER,
                'fields' => $sponsor_images->get_controls(),
                'prevent_empty' => false,
            ]
        );

        $this->add_control(
            'shape1',
            [
                'label' => __('Shape One', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'condition' => [
                    'layout_type' => 'layout_one'
                ]
            ]
        );

        $this->add_control(
            'shape2',
            [
                'label' => __('Shape Two', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'condition' => [
                    'layout_type' => 'layout_one'
                ]
            ]
        );

        $this->add_control(
            'shape',
            [
                'label' => __('Shape Three', 'zeinet-addon'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'condition' => [
                    'layout_type' => ['layout_three', 'layout_four']
                ]
            ]
        );

        $this->end_controls_section();

        zeinet_get_elementor_carousel_options($this, ['layout_one', 'layout_two', 'layout_three', 'layout_four']);
    }

    protected function render()
    {
        $settings = $this->get_settings_for_display();
        include zeinet_get_template('sponsors-one.php');
        include zeinet_get_template('sponsors-two.php');
        include zeinet_get_template('sponsors-three.php');
        include zeinet_get_template('sponsors-four.php');
    }
}