Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ezplatform urlalias lowecase
<?php
/**
* Created by PhpStorm.
* User: Vincent Guyard
* Date: 03/02/2017
* Time: 03:27
*
* Instrucctions: change the class from parameters
*
* parameters:
* ezpublish.persistence.slug_converter.class: AppBundle\Core\Persistence\Legacy\Content\UrlAlias\SlugConverterLG
*
*/
namespace AppBundle\Core\Persistence\Legacy\Content\UrlAlias;
use eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\SlugConverter;
use eZ\Publish\Core\Persistence\TransformationProcessor;
class SlugConverterLC extends SlugConverter {
/**
* Creates a new URL slug converter.
*
* @param \eZ\Publish\Core\Persistence\TransformationProcessor $transformationProcessor
* @param array $configuration
*/
public function __construct(TransformationProcessor $transformationProcessor, array $configuration = array())
{
$this->configuration['transformationGroups']['urlalias']['commands'] =
array_merge($this->configuration['transformationGroups']['urlalias']['commands'], array(
'ascii_lowercase',
'cyrillic_lowercase',
'greek_lowercase',
'latin1_lowercase',
'latin-exta_lowercase',
'latin_lowercase',
)
);
parent::__construct($transformationProcessor, $configuration);
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.