/** * @param TaskResult $taskResult * @return TaskResult * @throws \Exception */ protected final function fillComponentData(TaskResult $taskResult) { if ($taskResult->getComponent()) { $url = $this->componentsList->getComponentUri($taskResult->getComponent()); if (!$url) { throw new \Exception(sprintf('Component "%s" not found', $taskResult->getComponent())); } // build url if ($taskResult->getAction()) { $url .= substr($url, -1) == '/' ? '' : '/'; $url .= $taskResult->getAction(); } $taskResult->getTask()->setComponentUrl($url); } return $taskResult; }