PATH:
home
/
lab2454c
/
incforce.com
/
wp-content
/
plugins
/
smart-slider-3
/
Nextend
/
Framework
/
Form
/
Element
<?php namespace Nextend\Framework\Form\Element; use Nextend\Framework\Form\AbstractField; use Nextend\Framework\View\Html; class Button extends AbstractField { protected $url = ''; protected $target = ''; protected $buttonLabel = ''; protected $classes = array('n2_field_button'); public function __construct($insertAt, $name = '', $label = '', $buttonLabel = '', $parameters = array()) { $this->buttonLabel = $buttonLabel; parent::__construct($insertAt, $name, $label, '', $parameters); } protected function fetchElement() { return Html::tag('a', $this->getAttributes(), $this->buttonLabel); } /** * @param $className */ public function addClass($className) { $this->classes[] = $className; } /** * @return array */ protected function getAttributes() { $attributes = array( 'id' => $this->fieldID, 'class' => implode(' ', $this->classes) ); if (!empty($this->url)) { $attributes['href'] = $this->url; if (!empty($this->target)) { $attributes['target'] = $this->target; } } else { $attributes['href'] = '#'; } return $attributes; } public function setUrl($url) { $this->url = $url; } public function setTarget($target) { $this->target = $target; } }
[-] 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]