Yosymfony\Spress\Core\ContentManager\Permalink\PermalinkGenerator::getCategoriesPath PHP Method

getCategoriesPath() private method

private getCategoriesPath ( Yosymfony\Spress\Core\DataSource\ItemInterface $item )
$item Yosymfony\Spress\Core\DataSource\ItemInterface
    private function getCategoriesPath(ItemInterface $item)
    {
        $attributes = $item->getAttributes();
        if (isset($attributes['categories']) === false) {
            return;
        }
        if (is_array($attributes['categories']) === false) {
            throw new AttributeValueException('Invalid value. Expected array.', 'categories', $item->getPath());
        }
        return implode('/', array_map(function ($a) {
            return (new StringWrapper($a))->slug();
        }, $attributes['categories']));
    }