public function edit($listener, $metric)
    {
        publish('acl', ['js/control.js']);
        $collection = [];
        $instances  = $this->acl->all();
        $eloquent   = null;

        foreach ($instances as $name => $instance) {
            $collection[$name] = $this->getAuthorizationName($name);

            $name === $metric && $eloquent = $instance;
        }

        if (is_null($eloquent)) {
            return $listener->aclVerificationFailed();
        }
        $form = $this->formBuilder->create('Antares\Acl\Http\Form\Acl', [
            'method' => 'POST',
            'url'    => route('content/save'),
            'model'  => $eloquent
        ]);

        return $listener->indexSucceed(compact('eloquent', 'collection', 'metric', 'form'));
    }
public function edit($listener, $metric)
    {
        publish('acl', ['js/control.js']);
        $collection = [];
        $instances  = $this->acl->all();
        $eloquent   = null;

        foreach ($instances as $name => $instance) {
            $collection[$name] = $this->getAuthorizationName($name);

            $name === $metric && $eloquent = $instance;
        }

        if (is_null($eloquent)) {
            return $listener->aclVerificationFailed();
        }
        $form = $this->formBuilder->create('Antares\Acl\Http\Form\Acl', [
            'method' => 'POST',
            'url'    => route('content/save'),
            'model'  => $eloquent
        ]);

        return $listener->indexSucceed(compact('eloquent', 'collection', 'metric', 'form'));
    }
public function edit ( $ listener , $ metric ) { publish ( 'acl' , [ 'js/control.js' ] ) ; $ collection = [ ] ; $ instances = $ this -> acl -> all ( ) ; $ eloquent = null ; foreach ( $ instances as $ name => $ instance ) { $ collection [ $ name ] = $ this -> getAuthorizationName ( $ name ) ; $ name === $ metric && $ eloquent = $ instance ; } if ( is_null ( $ eloquent ) ) { return $ listener -> aclVerificationFailed ( ) ; } $ form = $ this -> formBuilder -> create ( 'Antares\Acl\Http\Form\Acl' , [ 'method' => 'POST' , 'url' => route ( 'content/save' ) , 'model' => $ eloquent ] ) ; return $ listener -> indexSucceed ( compact ( 'eloquent' , 'collection' , 'metric' , 'form' ) ) ; }
List ACL collection.

@param  object  $listener
@param  string  $metric

@return mixed
List ACL collection .