public function update($listener, array $input)
    {
        $metric = $input['metric'];
        $acl = $this->acl->get($metric);

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

        $roles = $acl->roles()->get();
        $actions = $acl->actions()->get();

        foreach ($roles as $roleKey => $roleName) {
            foreach ($actions as $actionKey => $actionName) {
                $value = ('yes' === Arr::get($input, "acl-{$roleKey}-{$actionKey}", 'no'));

                $acl->allow($roleName, $actionName, $value);
            }
        }

        return $listener->updateSucceed($metric);
    }
public function update($listener, array $input)
    {
        $metric = $input['metric'];
        $acl = $this->acl->get($metric);

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

        $roles = $acl->roles()->get();
        $actions = $acl->actions()->get();

        foreach ($roles as $roleKey => $roleName) {
            foreach ($actions as $actionKey => $actionName) {
                $value = ('yes' === Arr::get($input, "acl-{$roleKey}-{$actionKey}", 'no'));

                $acl->allow($roleName, $actionName, $value);
            }
        }

        return $listener->updateSucceed($metric);
    }
public function update ( $ listener , array $ input ) { $ metric = $ input [ 'metric' ] ; $ acl = $ this -> acl -> get ( $ metric ) ; if ( is_null ( $ acl ) ) { return $ listener -> aclVerificationFailed ( ) ; } $ roles = $ acl -> roles ( ) -> get ( ) ; $ actions = $ acl -> actions ( ) -> get ( ) ; foreach ( $ roles as $ roleKey => $ roleName ) { foreach ( $ actions as $ actionKey => $ actionName ) { $ value = ( 'yes' === Arr :: get ( $ input , "acl-{$roleKey}-{$actionKey}" , 'no' ) ) ; $ acl -> allow ( $ roleName , $ actionName , $ value ) ; } } return $ listener -> updateSucceed ( $ metric ) ; }
Update ACL metric.

@param  object  $listener
@param  array   $input

@return mixed
Update ACL metric .