Filename.php 458 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Config\Model\Config\Backend;
  7. /**
  8. * @api
  9. * @since 100.0.2
  10. */
  11. class Filename extends \Magento\Framework\App\Config\Value
  12. {
  13. /**
  14. * @return $this
  15. */
  16. public function beforeSave()
  17. {
  18. $value = $this->getValue();
  19. $value = basename($value);
  20. $this->setValue($value);
  21. return $this;
  22. }
  23. }