PATH:
home
/
lab2454c
/
incforce.com
/
wp-content
/
plugins
/
smart-slider-3
/
Nextend
/
Framework
/
Form
/
Element
<?php namespace Nextend\Framework\Form\Element; use Nextend\Framework\Asset\Js\Js; use Nextend\Framework\View\Html; class SelectIcon extends AbstractFieldHidden { protected $options; public function __construct($insertAt, $name = '', $label = false, $options = array(), $default = '', $parameters = array()) { $this->options = $options; parent::__construct($insertAt, $name, $label, $default, $parameters); } protected function fetchElement() { $currentValue = $this->getValue(); $html = Html::openTag('div', array( 'class' => 'n2_field_select_icon' )); foreach ($this->options as $value => $option) { $classes = array('n2_field_select_icon__option'); if ($currentValue == $value) { $classes[] = 'n2_field_select_icon__option--selected'; } $html .= Html::tag('div', array( 'class' => implode(' ', $classes), 'data-value' => $value ), Html::tag('div', array( 'class' => 'n2_field_select_icon__option_icon' ), '<i class="' . $option['icon'] . '"></i>') . Html::tag('div', array( 'class' => 'n2_field_select_icon__option_label' ), $option['label']) . Html::tag('div', array( 'class' => 'n2_field_select_icon__selected_marker' ), '<i class="ssi_16 ssi_16--check"></i>')); } $html .= Html::closeTag('div'); $html .= parent::fetchElement(); Js::addInline('new _N2.FormElementSelectIcon("' . $this->fieldID . '", ' . json_encode(array()) . ');'); return $html; } }
[-] Message.php
[edit]
[+]
Button
[-] Tab.php
[edit]
[-] Upload.php
[edit]
[+]
Radio
[-] Devices.php
[edit]
[+]
..
[-] Textarea.php
[edit]
[+]
Select
[-] IconTab.php
[edit]
[-] Grouping.php
[edit]
[-] Decoration.php
[edit]
[-] CheckboxOnOff.php
[edit]
[-] Breakpoint.php
[edit]
[-] MarginPadding.php
[edit]
[+]
Message
[-] Token.php
[edit]
[-] RichTextarea.php
[edit]
[-] Connected.php
[edit]
[-] LayerWindowFocus.php
[edit]
[-] AbstractFieldHidden.php
[edit]
[-] AbstractChooserText.php
[edit]
[+]
MixedField
[-] Unit.php
[edit]
[+]
Textarea
[-] EmptyArea.php
[edit]
[-] MixedField.php
[edit]
[+]
Text
[-] SelectIcon.php
[edit]
[-] Radio.php
[edit]
[-] Text.php
[edit]
[+]
Group
[-] Select.php
[edit]
[-] Hidden.php
[edit]
[-] AbstractChooser.php
[edit]
[-] Style.php
[edit]
[-] Font.php
[edit]
[-] Gap.php
[edit]
[-] OnOff.php
[edit]
[+]
Hidden
[-] Button.php
[edit]