/**
  * Check access to current object after entity was selected
  *
  * @param FindAfter $event
  */
 public function onFindAfter(FindAfter $event)
 {
     if (!$this->request) {
         return;
     }
     $this->checkObjectAccess($event->getEntity());
 }
Exemple #2
0
 public function testGetEntity()
 {
     $testEntity = new \stdClass();
     $event = new FindAfter($testEntity);
     $this->assertSame($testEntity, $event->getEntity());
 }
 /**
  * Check access to current object after entity was selected
  *
  * @param FindAfter $event
  */
 public function onFindAfter(FindAfter $event)
 {
     $this->checkObjectAccess($event->getEntity());
 }