Exemple #1
0
 public function fetch_headline_value($value, $document_id)
 {
     if (!empty($value)) {
         return Date::format($value);
     }
     return parent::fetch_headline_value($value, $document_id);
 }
Exemple #2
0
 public function onSetValue($value, DataSource_Hybrid_Document $doc)
 {
     $value = parent::onSetValue($value, $doc);
     if ($this->remove_empty_tags === TRUE) {
         return Kses::remove_empty_tags($value);
     }
     return $value;
 }
Exemple #3
0
 public function onControllerLoad()
 {
     Assets::package('colorpicker');
     parent::onControllerLoad();
 }
Exemple #4
0
 public function onControllerLoad()
 {
     Assets::js('Yandex.map', 'http://api-maps.yandex.ru/2.0/?load=package.full&lang=' . I18n::lang());
     parent::onControllerLoad();
 }
Exemple #5
0
 public function onValidateDocument(Validation $validation, DataSource_Hybrid_Document $doc)
 {
     $options = $this->get_options();
     if ($this->empty_value === TRUE) {
         $options = array(0) + $options;
     }
     $validation->rule($this->name, 'array_key_exists', array(':value', $options));
     return parent::onValidateDocument($validation, $doc);
 }
Exemple #6
0
 public function onValidateDocument(Validation $validation, DataSource_Hybrid_Document $doc)
 {
     $validation->rule($this->name, 'numeric');
     return parent::onValidateDocument($validation, $doc);
 }