Added logic to resolve extra columns on visits commands

This commit is contained in:
Alejandro Celaya
2022-05-23 21:19:59 +02:00
parent 00002b1e24
commit 353ac0fc0c
8 changed files with 123 additions and 10 deletions

View File

@@ -6,6 +6,7 @@ namespace Shlinkio\Shlink\CLI\Command\Visit;
use Shlinkio\Shlink\Common\Paginator\Paginator;
use Shlinkio\Shlink\Common\Util\DateRange;
use Shlinkio\Shlink\Core\Entity\Visit;
use Shlinkio\Shlink\Core\Model\VisitsParams;
use Symfony\Component\Console\Input\InputInterface;
@@ -24,4 +25,12 @@ class GetOrphanVisitsCommand extends AbstractVisitsListCommand
{
return $this->visitsHelper->orphanVisits(new VisitsParams($dateRange));
}
/**
* @return array<string, string>
*/
protected function mapExtraFields(Visit $visit): array
{
return ['type' => $visit->type()->value];
}
}