private getTitleSlugified ( Yosymfony\Spress\Core\DataSource\ItemInterface $item ) | ||
$item | Yosymfony\Spress\Core\DataSource\ItemInterface |
private function getTitleSlugified(ItemInterface $item)
{
$attributes = $item->getAttributes();
$preservePathTitle = $this->getPreservePathTitleAttribute($item);
if ($preservePathTitle === true && isset($attributes['title_path']) === true) {
return rawurlencode($attributes['title_path']);
}
if (isset($attributes['title']) === true) {
return (new StringWrapper($attributes['title']))->slug();
}
}