Allowed to display tags in the shortcode:list command

This commit is contained in:
Alejandro Celaya
2016-08-21 10:17:17 +02:00
parent e3021120e3
commit 2b89556c09
3 changed files with 46 additions and 3 deletions

View File

@@ -61,6 +61,7 @@ class ShortUrl extends AbstractEntity implements \JsonSerializable
$this->setDateCreated(new \DateTime());
$this->setVisits(new ArrayCollection());
$this->setShortCode('');
$this->tags = new ArrayCollection();
}
/**
@@ -177,6 +178,7 @@ class ShortUrl extends AbstractEntity implements \JsonSerializable
'originalUrl' => $this->originalUrl,
'dateCreated' => isset($this->dateCreated) ? $this->dateCreated->format(\DateTime::ISO8601) : null,
'visitsCount' => count($this->visits),
'tags' => $this->tags,
];
}
}