public function edit(RuleListener $listener, $id)
    {
        $rule = $this->repository->findById($id);

        if (!$rule) {
            return $listener->notFound($id);
        }

        $form = $this->presenter->form($rule);

        $this->dispatcher->fire('antares.form: ban_management.rules', [$rule, $form]);
        $this->dispatcher->fire('antares.form: foundation.ban_management.rules', [$rule, $form, 'foundation.ban_management']);

        return $listener->showEditForm(compact('rule', 'form'));
    }
public function edit(RuleListener $listener, $id)
    {
        $rule = $this->repository->findById($id);

        if (!$rule) {
            return $listener->notFound($id);
        }

        $form = $this->presenter->form($rule);

        $this->dispatcher->fire('antares.form: ban_management.rules', [$rule, $form]);
        $this->dispatcher->fire('antares.form: foundation.ban_management.rules', [$rule, $form, 'foundation.ban_management']);

        return $listener->showEditForm(compact('rule', 'form'));
    }
public function edit ( RuleListener $ listener , $ id ) { $ rule = $ this -> repository -> findById ( $ id ) ; if ( ! $ rule ) { return $ listener -> notFound ( $ id ) ; } $ form = $ this -> presenter -> form ( $ rule ) ; $ this -> dispatcher -> fire ( 'antares.form: ban_management.rules' , [ $ rule , $ form ] ) ; $ this -> dispatcher -> fire ( 'antares.form: foundation.ban_management.rules' , [ $ rule , $ form , 'foundation.ban_management' ] ) ; return $ listener -> showEditForm ( compact ( 'rule' , 'form' ) ) ; }
Creates form for the editing rule.

@param RuleListener $listener
@param int $id
@return mixed
Creates form for the editing rule .