/** * Execute the deletion of a record. * * @param Repository $repo * @param Content $entity * * @return boolean */ protected function deleteRecord(Repository $repo, Content $entity) { $recordId = $entity->getId(); $contentTypeName = (string) $entity->getContenttype(); if (!$this->users->isAllowed("contenttype:{$contentTypeName}:delete:{$recordId}")) { $this->loggerFlash->error(Trans::__('general.access-denied.content-not-modified', ['%title%' => $entity->getTitle()])); return; } return $repo->delete($entity); }