/** * Constructor. */ public function __construct(WorkspaceRegistrationQueue $queue) { $this->user = $queue->getUser(); $this->workspace = $queue->getWorkspace(); $this->role = $queue->getRole(); $details = array('role' => array('name' => $this->role->getTranslationKey())); $details['workspace'] = array('name' => $this->workspace->getName(), 'id' => $this->workspace->getId()); $details['receiverUser'] = array('firstName' => $this->user->getFirstName(), 'lastName' => $this->user->getLastName()); $this->details = $details; parent::__construct(self::ACTION, $this->details, $this->user, null, null, $this->role, $this->workspace); }
public function validateRegistration(WorkspaceRegistrationQueue $wksqrq) { $this->roleManager->associateRolesToSubjects(array($wksqrq->getUser()), array($wksqrq->getRole()), true); $this->objectManager->remove($wksqrq); $this->objectManager->flush(); }