Skip to content
Snippets Groups Projects
Commit ad7a801e authored by Théodore Biadala's avatar Théodore Biadala Committed by Jürgen Haas
Browse files

Issue #3404027 by nod_, jurgenhaas: Fix ECA integration for Content submodule

parent 304b4783
No related branches found
No related tags found
2 merge requests!16Issue #3443829 by rclemings: Missing fixes for issue 3425881 (UI changes),!11Fix event generation (2.2.x)
......@@ -27,8 +27,9 @@ abstract class DanseEventBase extends ActionBase implements ConfigurableInterfac
* Provides the data for the generic DANSE event.
*
* @return mixed
* The data for the event.
*/
abstract protected function getData(): mixed;
abstract protected function getData($entity = NULL): mixed;
/**
* {@inheritdoc}
......@@ -43,7 +44,7 @@ abstract class DanseEventBase extends ActionBase implements ConfigurableInterfac
* {@inheritdoc}
*/
public function execute($entity = NULL): void {
$this->service->createDanseEvent($this->configuration['topic_id'], $this->configuration['label'], $this->getData());
$this->service->createDanseEvent($this->configuration['topic_id'], $this->configuration['label'], $this->getData($entity));
}
/**
......
......@@ -24,7 +24,7 @@ class DanseEventContentEntity extends DanseEventBase {
public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
$result = AccessResult::forbidden();
if ($object instanceof ContentEntityInterface) {
$result = $object->access('view', $account);
$result = $object->access('view', $account, $return_as_object);
}
return $return_as_object ? $result : $result->isAllowed();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment