public function edit($listener, $metric)
    {
        $collection = [];
        $instances = $this->acl->all();
        $eloquent = null;

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

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

        if (is_null($eloquent)) {
            return $listener->aclVerificationFailed();
        }

        $actions = $this->getAuthorizationActions($eloquent, $metric);
        $roles = $this->getAuthorizationRoles($eloquent);

        return $listener->indexSucceed(compact('actions', 'roles', 'eloquent', 'collection', 'metric'));
    }
public function edit($listener, $metric)
    {
        $collection = [];
        $instances = $this->acl->all();
        $eloquent = null;

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

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

        if (is_null($eloquent)) {
            return $listener->aclVerificationFailed();
        }

        $actions = $this->getAuthorizationActions($eloquent, $metric);
        $roles = $this->getAuthorizationRoles($eloquent);

        return $listener->indexSucceed(compact('actions', 'roles', 'eloquent', 'collection', 'metric'));
    }
public function edit ( $ listener , $ metric ) { $ collection = [ ] ; $ instances = $ this -> acl -> all ( ) ; $ eloquent = null ; foreach ( $ instances as $ name => $ instance ) { $ collection [ $ name ] = ( string ) $ this -> getAuthorizationName ( $ name ) ; $ name === $ metric && $ eloquent = $ instance ; } if ( is_null ( $ eloquent ) ) { return $ listener -> aclVerificationFailed ( ) ; } $ actions = $ this -> getAuthorizationActions ( $ eloquent , $ metric ) ; $ roles = $ this -> getAuthorizationRoles ( $ eloquent ) ; return $ listener -> indexSucceed ( compact ( 'actions' , 'roles' , 'eloquent' , 'collection' , 'metric' ) ) ; }
List ACL collection.

@param  object  $listener
@param  string  $metric

@return mixed
List ACL collection .