src/Acl/EventListener/Entity/Permission/ValueListener.php
public function postLoad(Permission $permission, LifecycleEventArgs $event)
    {
        $item = $this->permissionCollection->get($permission->getKey());

        if (!$item) {
            throw new UnexpectedValueException('Permission "'.$permission->getKey().'" does not exist.');
        }

        $permission
            ->setType($item->getType())
            ->setValue($item->getValue());
    }
public function postLoad(Permission $permission, LifecycleEventArgs $event)
    {
        $item = $this->permissionCollection->get($permission->getKey());

        if (!$item) {
            throw new UnexpectedValueException('Permission "'.$permission->getKey().'" does not exist.');
        }

        $permission
            ->setType($item->getType())
            ->setValue($item->getValue());
    }
public function postLoad ( Permission $ permission , LifecycleEventArgs $ event ) { $ item = $ this -> permissionCollection -> get ( $ permission -> getKey ( ) ) ; if ( ! $ item ) { throw new UnexpectedValueException ( 'Permission "' . $ permission -> getKey ( ) . '" does not exist.' ) ; } $ permission -> setType ( $ item -> getType ( ) ) -> setValue ( $ item -> getValue ( ) ) ; }
Hydrate the permission entity with permission configurations

@param \Ds\Component\Acl\Entity\Permission $permission
@param \Doctrine\ORM\Event\LifecycleEventArgs $event
@throws \UnexpectedValueException
Hydrate the permission entity with permission configurations