public function AcquiaContentHubFiltersCommands::filterDetails in Acquia Content Hub 8.2
Prints filter details.
@command acquia:contenthub-filter-details @aliases ach-cfds
@usage acquia:contenthub-filter-details 00000000-0000-0000-0000-000000000000 Prints filter details.
Parameters
string $uuid: Cloud filter's UUID.
File
- src/
Commands/ AcquiaContentHubFiltersCommands.php, line 186
Class
- AcquiaContentHubFiltersCommands
- Drush command to interact with Acquia Content Hub filters.
Namespace
Drupal\acquia_contenthub\CommandsCode
public function filterDetails(string $uuid) : void {
try {
$filter = $this
->fetchFilterInfo($uuid);
} catch (\Exception $exception) {
$this
->io()
->error($exception
->getMessage());
return;
}
$rows = [
dt('UUID: {uuid}', [
'uuid' => $filter['data']['uuid'],
]),
dt('Name: {name}', [
'name' => $filter['data']['name'],
]),
dt('Query: {query}', [
'query' => json_encode($filter['data']['data']['query']),
]),
dt('Metadata: {meta}', [
'meta' => json_encode($filter['data']['metadata']),
]),
];
$this
->writeln($rows);
}