예제 #1
0
 /**
  * @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;
         }
     }
 }
예제 #2
0
 /**
  * Get the data in a serializable format.
  *
  * @return array
  */
 public function yamlSerialize()
 {
     $option = parent::yamlSerialize();
     $option['specific'] = array('choice' => $this->choice);
     return $option;
 }
예제 #3
0
 /**
  * @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';
 }
예제 #4
0
 /**
  * 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;
 }
예제 #5
0
 /**
  * @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'];
 }