| 1 | <?php |
||
| 16 | class CollectionPermalink implements PermalinkInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * {@inheritdoc} |
||
| 20 | */ |
||
| 21 | public function generate(PostInterface $post) |
||
| 22 | { |
||
| 23 | return null == $post->getCollection() |
||
| 24 | ? $post->getSlug() |
||
| 25 | : sprintf('%s/%s', $post->getCollection()->getSlug(), $post->getSlug()); |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * {@inheritdoc} |
||
| 30 | */ |
||
| 31 | public function getParameters($permalink) |
||
| 51 | } |
||
| 52 |