public function fetch_headline_value($value, $document_id) { if (!empty($value)) { return Date::format($value); } return parent::fetch_headline_value($value, $document_id); }
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; }
public function onControllerLoad() { Assets::package('colorpicker'); parent::onControllerLoad(); }
public function onControllerLoad() { Assets::js('Yandex.map', 'http://api-maps.yandex.ru/2.0/?load=package.full&lang=' . I18n::lang()); parent::onControllerLoad(); }
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); }
public function onValidateDocument(Validation $validation, DataSource_Hybrid_Document $doc) { $validation->rule($this->name, 'numeric'); return parent::onValidateDocument($validation, $doc); }