Backend\Modules\Users\Actions\UndoDelete::execute PHP Метод

execute() публичный Метод

Execute the action
public execute ( )
    public function execute()
    {
        $email = $this->getParameter('email', 'string');
        // does the user exist
        if ($email !== null) {
            parent::execute();
            // delete item
            if (BackendUsersModel::undoDelete($email)) {
                // get user
                $user = new BackendUser(null, $email);
                // trigger event
                $item = array('id' => $user->getUserId(), 'email' => $email);
                BackendModel::triggerEvent($this->getModule(), 'after_undelete', array('item' => $item));
                // item was deleted, so redirect
                $this->redirect(BackendModel::createURLForAction('edit') . '&id=' . $user->getUserId() . '&report=restored&var=' . $user->getSetting('nickname') . '&highlight=row-' . $user->getUserId());
            } else {
                // invalid user
                $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
            }
        } else {
            $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing');
        }
    }
UndoDelete