TextValueTrimmer.php 344 B

1234567891011121314151617
  1. <?php
  2. namespace Dotdigitalgroup\Email\Model\Adminhtml\Backend;
  3. use Magento\Framework\App\Config\Value;
  4. class TextValueTrimmer extends Value
  5. {
  6. public function beforeSave()
  7. {
  8. $value = $this->getValue();
  9. $trimmedValue = trim($value);
  10. $this->setValue($trimmedValue);
  11. return parent::beforeSave();
  12. }
  13. }