objectManager = $objectManager; $this->relationActions = $relationActions; } /** * @param string $entityType * @param string $actionName * @return object[] * @throws \Exception */ public function getActions($entityType, $actionName) { $actions = []; if (!isset($this->relationActions[$entityType][$actionName])) { return $actions; } foreach ($this->relationActions[$entityType][$actionName] as $actionClassName) { $action = $this->objectManager->get($actionClassName); $actions[] = $action; } return $actions; } }