Exemplo n.º 1
0
 /**
  * Remove entity
  *
  * @param \XLite\Model\AEntity $entity Entity
  *
  * @return boolean
  */
 protected function removeEntity(\XLite\Model\AEntity $entity)
 {
     $pathSkin = 'theme_tweaker/default';
     $localPath = $entity->getTemplate();
     $shortPath = substr($localPath, strpos($localPath, LC_DS, strlen($pathSkin . LC_DS)) + strlen(LC_DS));
     $fullPath = $this->getFullPathByShortPath($shortPath);
     \Includes\Utils\FileManager::deleteFile($fullPath);
     \XLite\Core\FlexyCompiler::getInstance()->remove($fullPath);
     parent::removeEntity($entity);
     return true;
 }