uawdijnntqw1x1x1
IP : 216.73.217.167
Hostname : xhost1.intravision.ru
Kernel : Linux xhost1.intravision.ru 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
tiskom
/
data
/
www
/
tiskom.xhost.intravision.ru
/
.
/
bitrix
/
modules
/
seo
/
.
/
lib
/
.
/
leadads
/
field.php
/
/
<? namespace Bitrix\Seo\LeadAds; use Bitrix\Main\ArgumentNullException; /** * Class Field. * Metadata of question field in form. * * @package Bitrix\Seo\LeadAds */ class Field { const TYPE_INPUT = 'input'; const TYPE_TEXT_AREA = 'textarea'; const TYPE_RADIO = 'radio'; const TYPE_CHECKBOX = 'checkbox'; const TYPE_SELECT = 'select'; protected $type = self::TYPE_INPUT; protected $name = null; protected $label = null; protected $key = null; protected $options = []; /** * Create field. * * @param string $type Type. * @param string|null $name Name. * @param string|null $label Label. * @param string|null $key Key. * @return static */ public static function create($type = self::TYPE_INPUT, $name = null, $label = null, $key = null) { return new static($type, $name, $label, $key); } public function getMapItem(array $map = []) { } /** * Convert to array. * * @return array */ public function toArray() { return [ 'type' => $this->type, 'name' => $this->name, 'label' => $this->label, 'key' => $this->key, 'options' => $this->options, ]; } /** * Field constructor. * * @param string $type Type. * @param string|null $name Name. * @param string|null $label Label. * @param string|null $key Key. */ public function __construct($type = self::TYPE_INPUT, $name = null, $label = null, $key = null) { $this->type = $type; $this->name = $name; $this->label = $label; $this->key = $key; } /** * Add option. * * @param string $key Key. * @param string $label Label. * @throws ArgumentNullException * @return $this */ public function addOption($key, $label) { if (empty($key)) { throw new ArgumentNullException('$key'); } if (empty($label)) { throw new ArgumentNullException('$label'); } $this->options[] = [ 'key' => $key, 'label' => $label ]; return $this; } /** * Set options. * * @param array $options Options. * @return $this */ public function setOptions(array $options) { $this->options = []; foreach ($options as $option) { $this->addOption($option['key'], $option['label']); } return $this; } /** * Get type. * * @return string */ public function getType() { return $this->type; } /** * Get name. * * @return string */ public function getName() { return $this->name; } /** * Get label. * * @return null|string */ public function getLabel() { return $this->label; } /** * Get key. * * @return null|string */ public function getKey() { return $this->key; } /** * Get options. * * @return array */ public function getOptions() { return $this->options; } }
/var/www/tiskom/data/www/tiskom.xhost.intravision.ru/./bitrix/modules/seo/./lib/./leadads/field.php