public function loadData(User $user) { $this->setFirstname($user->getFirstname()); $this->setSurname($user->getSurname()); $this->setBirthday($user->getBirthday()); $this->setCountry($user->getCountry()); return $this; }
public function getAgegroupByUser(Entity\User $user = null) { $ret = null; if ($user == null) { return $ret; } $birthday = $user->getBirthday(); if ($birthday == null) { return $ret; } return $this->getAgegroupByDate($birthday); }