Source of file EditableFieldMemberList.php
Size: 0,591 Bytes - Last Modified: 2021-12-23T10:19:50+00:00
/var/www/docs.ssmods.com/process/src/code/extensions/editablefields/EditableFieldMemberList.php
123456789101112131415161718192021222324252627282930 | <?php /** * @author Mohamed Alsharaf <mohamed.alsharaf@gmail.com> */ class EditableFieldMemberListExtension extends DataExtension { /** * Get field value that is suitable for the view template file. * * @return Member */ public function getViewValue() { return Member::get()->byID((int) $this->owner->Value); } /** * Get string value of a field. * * @return null|string */ public function getValueAsString() { $member = $this->getViewValue(); return $member ? $member->getName() : ''; } } |