| Current Path : /home/rtorresani/www/app/code/Amasty/ExportCore/Export/DataHandling/FieldModifier/ |
| Current File : //home/rtorresani/www/app/code/Amasty/ExportCore/Export/DataHandling/FieldModifier/Lowercase.php |
<?php
declare(strict_types=1);
/**
* @author Amasty Team
* @copyright Copyright (c) Amasty (https://www.amasty.com)
* @package Export Core for Magento 2 (System)
*/
namespace Amasty\ExportCore\Export\DataHandling\FieldModifier;
use Amasty\ExportCore\Api\FieldModifier\FieldModifierInterface;
use Amasty\ExportCore\Export\DataHandling\AbstractModifier;
use Amasty\ExportCore\Export\DataHandling\ModifierProvider;
class Lowercase extends AbstractModifier implements FieldModifierInterface
{
public function transform($value)
{
if (empty($value) || !is_string($value)) {
return $value;
}
return mb_strtolower($value);
}
public function getGroup(): string
{
return ModifierProvider::TEXT_GROUP;
}
public function getLabel(): string
{
return __('Lower Case')->getText();
}
}