__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
<?php


namespace Nextend\SmartSlider3\Form\Element;

use Nextend\Framework\Asset\Js\Js;
use Nextend\Framework\Form\Container\ContainerSubform;
use Nextend\Framework\Form\ContainerInterface;
use Nextend\Framework\Form\Element\AbstractFieldHidden;
use Nextend\Framework\Form\TraitFieldset;
use Nextend\Framework\Url\Url;
use Nextend\SmartSlider3\Widget\Group\AbstractWidgetGroup;

class ControlTypePicker extends AbstractFieldHidden {

    protected $hasTooltip = false;

    protected $options = array();

    protected $plugins = array();

    protected $ajaxUrl = '';

    /**
     * @var ContainerSubform
     */
    protected $containerSubform;

    /** @var AbstractWidgetGroup */
    private $widgetGroup;

    /**
     * SubFormIcon constructor.
     *
     * @param TraitFieldset       $insertAt
     * @param string              $name
     * @param ContainerInterface  $container
     * @param string              $ajaxUrl
     * @param AbstractWidgetGroup $widgetGroup
     * @param string              $default
     * @param array               $parameters
     */
    public function __construct($insertAt, $name, $container, $ajaxUrl, $widgetGroup, $default = '', $parameters = array()) {

        $this->name        = $name;
        $this->widgetGroup = $widgetGroup;

        $this->ajaxUrl = $ajaxUrl;

        parent::__construct($insertAt, $name, false, $default, $parameters);

        $this->initOptions();

        $this->containerSubform = new ContainerSubform($container, $name . '-subform');

        $this->getCurrentPlugin($this->getValue())
             ->renderFields($this->containerSubform);
    }

    protected function fetchElement() {
        $html = '<div class="n2_field_control_type_picker">';
        foreach ($this->options as $key => $option) {
            $html .= '<div class="n2_field_control_type_picker__item" data-controltype="' . $key . '">';
            $html .= '<img alt="" src="' . Url::pathToUri($option['path']) . '">';
            $html .= '<div class="n2_field_control_type_picker__selected_marker"><i class="ssi_16 ssi_16--check"></i></div>';
            $html .= '</div>';
        }
        $html .= parent::fetchElement();
        $html .= '</div>';

        Js::addInline('new _N2.FormElementControlTypePicker( "' . $this->fieldID . '",  ' . json_encode(array(
                'ajaxUrl'       => $this->ajaxUrl,
                'target'        => $this->containerSubform->getId(),
                'originalValue' => $this->getValue()
            )) . ');');

        return $html;
    }


    protected function getCurrentPlugin($value) {

        if (!isset($this->plugins[$value])) {
            list($value) = array_keys($this->plugins);
        }

        return $this->plugins[$value];
    }

    private function initOptions() {

        $this->plugins = $this->widgetGroup->getWidgets();

        foreach ($this->plugins as $name => $type) {
            $this->options[$name] = array(
                'path' => $type->getSubFormImagePath()
            );
        }
        if (count($this->options) == 1) {
            $this->parent->hide();
        }
    }

}

Filemanager

Name Type Size Permission Actions
Group Folder 0775
Radio Folder 0775
Select Folder 0775
BackgroundAnimation.php File 577 B 0664
BackgroundImage.php File 582 B 0664
Columns.php File 977 B 0664
ControlTypePicker.php File 3.05 KB 0664
DatePicker.php File 4.78 KB 0664
PublishSlider.php File 967 B 0664
WidgetArea.php File 1.05 KB 0664
Filemanager