public function addUserForSki(\Application\Form\SkiUser $skiUserForm, \Application\Entity\Ski $ski) { /** @var \Application\Entity\User $user */ $user = $this->getServiceLocator()->get('entity_manager')->getRepository('Application\\Entity\\User')->find($skiUserForm->get('user')->getValue()); $ski->addUser($user); $this->getEntityManager()->persist($ski); }
/** * {@inheritDoc} */ public function deleteUser($user) { $this->__initializer__ && $this->__initializer__->__invoke($this, 'deleteUser', array($user)); return parent::deleteUser($user); }