public function createComponentRegistration() { $roles = array(); foreach ($this->extendedPage->roles as $role) { $roles[] = $role->name; } /** @var RegistrationControl $control */ $control = $this->registrationControlFactory->invoke($this->extendedPage->userType, $this->extendedPage->mode, $this->extendedPage->socialMode, $roles, $this->extendedPage->sender, $this->extendedPage->mailFrom, $this->extendedPage->subject, $this->extendedPage->email); $control->onSuccess[] = $this->registrationSuccess; $control->onEnable[] = $this->registrationEnable; $control->onError[] = $this->registrationError; return $control; }
public function createRegistration($name) { $name = str_replace('_', ' ', $name); /** @var RegistrationControl $control */ $control = $this->registrationControlFactory->invoke($this->registrations[$name]['userType'], $this->registrations[$name]['mode'], $this->registrations[$name]['loginProviderMode'], $this->registrations[$name]['roles'], $this->registrations[$name]['email']['sender'], $this->registrations[$name]['email']['from'], $this->registrations[$name]['email']['subject'], $this->registrations[$name]['email']['text']); $control->onLoad[] = $this->registrationLoad; $control->onSuccess[] = $this->registrationSuccess; $control->onEnable[] = $this->registrationEnable; $control->onError[] = $this->registrationError; return $control; }