Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
CustomCss.php
Go to the documentation of this file.
1 <?php
11 
12 class CustomCss extends \Magento\Framework\View\Design\Theme\Customization\AbstractFile
13 {
17  const TYPE = 'custom_css';
18 
19  const CONTENT_TYPE = 'css';
20 
26  const FILE_NAME = 'custom.css';
27 
31  const SORT_ORDER = 10;
32 
36  public function getType()
37  {
38  return self::TYPE;
39  }
40 
44  public function getContentType()
45  {
46  return self::CONTENT_TYPE;
47  }
48 
52  protected function _prepareFileName(\Magento\Framework\View\Design\Theme\FileInterface $file)
53  {
54  if (!$file->getFileName()) {
55  $file->setFileName(self::FILE_NAME);
56  }
57  }
58 
62  protected function _prepareSortOrder(\Magento\Framework\View\Design\Theme\FileInterface $file)
63  {
64  $file->setData('sort_order', self::SORT_ORDER);
65  }
66 }
_prepareSortOrder(\Magento\Framework\View\Design\Theme\FileInterface $file)
Definition: CustomCss.php:62
_prepareFileName(\Magento\Framework\View\Design\Theme\FileInterface $file)
Definition: CustomCss.php:52