if (isset($remoteEntityDescription)) { if (is_array($remoteEntityDescription)) { if (array_key_exists($language, $remoteEntityDescription)) { $remoteEntityFormatted['description'][$language] = $remoteEntityDescription[$language]; } else { reset($remoteEntityDescription); $remoteEntityFormatted['description'][$language] = 'No description in current language (' . current($remoteEntityDescription) . ')'; } } else { $remoteEntityFormatted['description'][$language] = $remoteEntityDescription; } } else { $remoteEntityFormatted['description'][$language] = 'No description given'; } // Pass along a text color if available if (isset($workflowstates[$remoteEntity->getWorkflow()]['textColor'])) { $remoteEntityFormatted['textColor'] = $workflowstates[$remoteEntity->getWorkflow()]['textColor']; } // Pass along an abbreviation for the workflow state $remoteEntityFormatted['state'] = '?'; $currentWorkflow = $workflowstates[$remoteEntity->getWorkflow()]; if (is_array($currentWorkflow)) { if (isset($currentWorkflow['abbr'])) { $remoteEntityFormatted['state'] = $currentWorkflow['abbr']; } elseif (isset($currentWorkflow['name']) and is_array($currentWorkflow['name']) and isset($currentWorkflow['name'][$language])) { $remoteEntityFormatted['state'] = $currentWorkflow['name'][$language]; } } // Pass along whether the remote entity has blocked the current entity $remoteEntityFormatted['blocked'] = false; foreach ($reverseBlockedEntities as $reverseBlockedEntity) {