/** * Prepare the file * * @param \Magento\Framework\View\Design\Theme\FileInterface $file * @return $this */ public function prepareFile(\Magento\Framework\View\Design\Theme\FileInterface $file) { $file->setData('file_type', $this->getType()); if (!$file->getId()) { $this->_prepareFileName($file); $this->_prepareFilePath($file); $this->_prepareSortOrder($file); } return $this; }