/** * @param String $name Name of the option * @param array $translations Array with translations for option. * @param array $data */ public function __construct($name, $translations, $data) { parent::__construct($name, $translations, $data); foreach ($data['urls'] as $key => $url) { if (!empty($url)) { $this->urls[$key] = $url; } } }
/** * Get the data in a serializable format. * * @return array */ public function yamlSerialize() { $option = parent::yamlSerialize(); $option['specific'] = array('choice' => $this->choice); return $option; }
/** * @param String $name Name of the option * @param array $translations Array with translations for option. * @param array $data */ public function __construct($name, $translations, $data) { parent::__construct($name, $translations, $data); $this->active = $data['active'] == 'true'; }
/** * Get the data in a serializable format. * * @return array */ public function yamlSerialize() { $option = parent::yamlSerialize(); $option['specific'] = array('regex' => $this->regex, 'regexError' => $this->regexError, 'html' => $this->html); return $option; }
/** * @param String $name Name of the option * @param array $translations Array with translations for option. * @param array $data */ public function __construct($name, $translations, $data) { parent::__construct($name, $translations, $data); $this->url = $data['url']; }