%PDF- %PDF-
| Direktori : /home/opti/public_html/stlc/wp-content/plugins/insur-addon/includes/Widgets/ |
| Current File : /home/opti/public_html/stlc/wp-content/plugins/insur-addon/includes/Widgets/WorkProcess.php |
<?php
namespace Layerdrops\Insur\Widgets;
class WorkProcess extends \Elementor\Widget_Base
{
public function get_name()
{
return 'insur-work-process';
}
public function get_title()
{
return __('Work Process', 'insur-addon');
}
public function get_icon()
{
return 'eicon-cogs';
}
public function get_categories()
{
return ['insur-category'];
}
protected function register_controls()
{
$this->start_controls_section(
'layout_section',
[
'label' => __('Layout', 'insur-addon'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
]
);
$this->add_control(
'layout_type',
[
'label' => __('Select Layout', 'insur-addon'),
'type' => \Elementor\Controls_Manager::SELECT2,
'default' => 'layout_one',
'options' => [
'layout_one' => __('Layout One', 'insur-addon'),
]
]
);
$this->end_controls_section();
$this->start_controls_section(
'content_section',
[
'label' => __('Content', 'insur-addon'),
'tab' => \Elementor\Controls_Manager::TAB_CONTENT,
'condition' => [
'layout_type' => 'layout_one'
]
]
);
$this->add_control(
'sec_title',
[
'label' => __('Title', 'insur-addon'),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'default' => __('Awesome Title', 'insur-addon'),
]
);
$this->add_control(
'sec_sub_title',
[
'label' => __('Sub Title', 'insur-addon'),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'default' => __('Default Sub Text', 'insur-addon'),
]
);
$this->add_control(
'sub_title_left_shape',
[
'label' => __('Sub Title Left Shape', 'insur-addon'),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [],
]
);
$this->add_control(
'sub_title_right_shape',
[
'label' => __('Sub Title Right Shape', 'insur-addon'),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [],
]
);
$work_process_items = new \Elementor\Repeater();
$work_process_items->add_control(
'title',
[
'label' => __('Title', 'insur-addon'),
'type' => \Elementor\Controls_Manager::TEXT,
'default' => __('Select insurance', 'insur-addon'),
'label_block' => true,
]
);
$work_process_items->add_control(
'content',
[
'label' => __('Content', 'insur-addon'),
'type' => \Elementor\Controls_Manager::TEXTAREA,
'default' => __('Awesome Content', 'insur-addon'),
'label_block' => true,
]
);
$work_process_items->add_control(
'icon',
[
'label' => __('Icon', 'insur-addon'),
'type' => \Elementor\Controls_Manager::ICONS,
'default' => [
'value' => 'icon-select',
'library' => 'custom-icon',
],
]
);
$this->add_control(
'work_process_items',
[
'label' => __('Work Process Items', 'insur-addon'),
'type' => \Elementor\Controls_Manager::REPEATER,
'fields' => $work_process_items->get_controls(),
'prevent_empty' => false,
'title_field' => '{{{ title }}}',
]
);
$this->add_control(
'bg_image',
[
'label' => __('Background Image', 'insur-addon'),
'type' => \Elementor\Controls_Manager::MEDIA,
'default' => [],
]
);
$this->end_controls_section();
//General style
$this->start_controls_section(
'general_style',
[
'label' => esc_html__('Style Options', 'insur-addon'),
'tab' => \Elementor\Controls_Manager::TAB_STYLE,
]
);
insur_typo_and_color_options($this, 'Section Title', '{{WRAPPER}} .section-title__title', ['layout_one']);
insur_typo_and_color_options($this, 'Section Sub Title', '{{WRAPPER}} .section-sub-title', ['layout_one']);
insur_typo_and_color_options($this, 'Title', '{{WRAPPER}} .process__title', ['layout_one']);
insur_typo_and_color_options($this, 'Content', '{{WRAPPER}} .process__text', ['layout_one']);
$this->end_controls_section();
}
protected function render()
{
$settings = $this->get_settings_for_display();
include insur_get_template('work-process-one.php');
}
}