Skip to content

Instantly share code, notes, and snippets.

@skrosoft
Created February 3, 2017 06:30
Show Gist options
  • Save skrosoft/124942a0155f45e8df06a362db8aba84 to your computer and use it in GitHub Desktop.
Save skrosoft/124942a0155f45e8df06a362db8aba84 to your computer and use it in GitHub Desktop.
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