public static function toRepresentativeOwnerData(Representative $representative) { $data = ['id' => $representative->getId(), 'type' => $representative->getType(), 'official_title' => $representative->getOfficialTitle(), 'first_name' => $representative->getFirstName(), 'last_name' => $representative->getLastName(), 'avatar_file_path' => $representative->getAvatarFileName()]; if ($representative->getStorageId()) { $data['storage_id'] = $representative->getStorageId(); } return $data; }
public function getAvatarFileName() { $this->__load(); return parent::getAvatarFileName(); }