protected function StatusReportController::buildClientEntityTableRow in Acquia Content Hub 8.2
Builds a single row in the client table.
Parameters
array $client: Client CDF.
string $name: Client's name.
array $type: Pubisher or subscriber or both.
string $webhook_uuid: Webhook UUID, could be unregistered.
string $webhook_url: Webhook URL, could be unregistered.
string $status: Progress status, see self::getClientStatus() for logic.
string $percent_exported: Percent of entities exported.
string $percent_imported: Percent of entities imported.
string $last_updated: Last updated time, see self::getLastUpdatedTime() for logic.
mixed $link: Drupal-formatted link.
Return value
array Drupal-formatted render array.
1 call to StatusReportController::buildClientEntityTableRow()
- StatusReportController::getWebhooksPageSection in modules/
acquia_contenthub_publisher/ src/ Controller/ StatusReportController.php - Returns the Webhooks page section.
File
- modules/
acquia_contenthub_publisher/ src/ Controller/ StatusReportController.php, line 284
Class
- StatusReportController
- Controller for Status Reports.
Namespace
Drupal\acquia_contenthub_publisher\ControllerCode
protected function buildClientEntityTableRow(array $client, $name, array $type, $webhook_uuid, $webhook_url, $status, $percent_exported, $percent_imported, $last_updated, $link) {
return [
'name' => [
'#markup' => $this
->t('<span title="@uuid">@name</span><span class="current">@current</span>', [
'@uuid' => $client['uuid'],
'@name' => $name,
'@current' => $client['uuid'] === $this->client
->getSettings()
->getUuid() ? '(current)' : '',
]),
],
'type' => [
'#markup' => $this
->t('@types', [
'@types' => empty($type) ? 'Unknown' : implode(', ', $type),
]),
],
'uuid' => [
'#markup' => $this
->t('<span title="@uuid">@url</span>', [
'@uuid' => $webhook_uuid,
'@url' => $webhook_url,
]),
],
'status' => [
'#markup' => $this
->t('@status', [
'@status' => $status,
]),
],
'percent_exported' => [
'#markup' => $percent_exported,
],
'percent_imported' => [
'#markup' => $percent_imported,
],
'updated' => [
'#markup' => $this
->t('@last_updated', [
'@last_updated' => $last_updated,
]),
],
'details' => [
'#markup' => $link,
],
];
}