コード例 #1
0
 /**
  * {@inheritdoc}
  */
 protected function deleteEntity($entity, ObjectManager $em)
 {
     parent::deleteEntity($entity, $em);
     if ($this->aclSidManager->isAclEnabled()) {
         $this->aclSidManager->deleteSid($this->aclSidManager->getSid($entity));
     }
 }
コード例 #2
0
 public function testIsAclEnabled()
 {
     $manager = new AclSidManager();
     $this->assertFalse($manager->isAclEnabled());
     $aclProvider = $this->getMockBuilder('Oro\\Bundle\\SecurityBundle\\Acl\\Dbal\\MutableAclProvider')->disableOriginalConstructor()->getMock();
     $manager = new AclSidManager($aclProvider);
     $this->assertTrue($manager->isAclEnabled());
 }