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