for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Muhammed Akbulut <[email protected]>
* @copyright Zicht Online <http://www.zicht.nl>
*/
namespace Zicht\Bundle\UrlBundle\Form\DataTransformer;
use Symfony\Component\Form\DataTransformerInterface;
* Class TextTransformer
*
* @package Zicht\Bundle\UrlBundle\Form\DataTransformer
class TextTransformer extends AbstractAliasingTransformer
{
* Delegates the text mapping to the aliasing service.
* @param string $text
* @param string $mode
* @return mixed|null
protected function doMap($text, $mode)
$map = $this->aliasing->getAliasingMap([$text], $mode);
if (count($map) === 1) {
return current($map);
}
return $text;