Source of file EditableFieldDate.php
Size: 0,623 Bytes - Last Modified: 2021-12-23T10:19:50+00:00
/var/www/docs.ssmods.com/process/src/code/extensions/editablefields/EditableFieldDate.php
123456789101112131415161718192021222324252627282930313233 | <?php /** * @author Mohamed Alsharaf <mohamed.alsharaf@gmail.com> */ class EditableFieldDateExtension extends DataExtension { /** * Get field value that is suitable for the view template file. * * @return Date */ public function getViewValue() { $value = Object::create('Date'); $value->setValue($this->owner->Value); return $value; } /** * Get string value of a field. * * @return null|string */ public function getValueAsString() { $date = $this->getViewValue(); return $date ? $date->Nice() : ''; } } |