Beispiel #1
0
 /**
  * {@inheritDoc}
  */
 public function trashUuid($id)
 {
     $uuid = $this->getUuid($id);
     $class = ClassUtils::getClass($uuid);
     $permission = $this->moduleOptions->getPermission($class, 'trash');
     $this->assertGranted($permission, $uuid);
     if ($uuid->isTrashed()) {
         return;
     }
     $uuid->setTrashed(true);
     $this->getObjectManager()->persist($uuid);
     $this->getEventManager()->trigger('trash', $this, ['object' => $uuid]);
 }
Beispiel #2
0
 public function getPermission(UuidInterface $object, $action)
 {
     $class = ClassUtils::getClass($object);
     return $this->moduleOptions->getPermission($class, $action);
 }