nav = $nav; } /** * Set user profile. * * @param Profile $profile user account * * @return void * * @since 1.0.0 * @codeCoverageIgnore */ public function setProfile(Profile $profile) : void { $this->profile = $profile; } /** * Get profile image * * @return string Profile image link * * @since 1.0.0 */ public function getProfileImage() : string { if ($this->profile === null || $this->profile->getImage()->getPath() === '') { return UriFactory::build('Web/Timerecording/img/user_default_' . \mt_rand(1, 6) . '.png'); } return UriFactory::build($this->profile->getImage()->getPath()); } /** * Set organizations * * @param Unit[] $organizations Organizations * * @return void * * @since 1.0.0 * @codeCoverageIgnore */ public function setOrganizations(array $organizations) : void { $this->organizations = $organizations; } }