public function __construct(User $user) { $this->id = $user->getId(); $this->firstname = $user->getFirstname(); $this->lastname = $user->getLastname(); $this->email = $user->getEmail(); $this->positionLong = $user->getPositionLong(); $this->positionLat = $user->getPositionLat(); $this->positionCity = $user->getPositionCity(); $this->positionDep = $user->getPositionDep(); $this->positionCountry = $user->getPositionCountry(); $this->photo = $user->getPhoto(); }
/** * {@inheritDoc} */ public function getLastname() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getLastname', []); return parent::getLastname(); }
/** * Turn this item object into a generic array * * @return array */ public function transform(User $user) { return ['id' => (int) $user->getId(), 'username' => $user->getUsername(), 'email' => $user->getEmail(), 'lastLogin' => $user->getLastLogin(), 'enabled' => (bool) $user->isEnabled(), 'firstname' => $user->getFirstname(), 'lastname' => $user->getLastname(), 'fullname' => $user->getFullname(), 'displayname' => $user->getDisplayName()]; }