public function __construct($filepath = NULL) { if ($filepath === NULL || !file_exists($filepath)) { $filepath = Path::joinPaths(BASE_DIRECTORY, '../Resources/CodeTemplates/Typo3/ext_emconf.php'); } else { $this->extensionKey = basename(getcwd()); $this->filepath = $filepath; } $_EXTKEY = 'foo'; $EM_CONF = array(); require $filepath; $this->data = $EM_CONF[$_EXTKEY]; $this->composer = new ComposerFacade('composer.json'); }
public function getName() { $metadata = new Metadata(Path::joinPaths($this->path, 'ext_emconf.php')); return $metadata->getTitle() . ' (' . basename($this->path) . ')'; }
public function remove() { $extEmconfFacade = new ExtEmconfFacade(); $providers = array('Page' => 'fluidpages', 'Content' => 'fluidcontent', 'Backend' => 'fluidbackend'); foreach ($providers as $providerName => $providerExtension) { if (isset($this->providers[$providerName])) { $this->extTablesFacade->removeCode($this->providers[$providerName]['code']); } $extEmconfFacade->removeDependency($providerExtension); $templatePath = Path::joinPaths('Resources/Private/Templates', $providerName); if (!file_exists($templatePath)) { continue; } $files = scandir($templatePath); foreach ($files as $file) { if (substr($file, 0, 1) == '.') { continue; } unlink(Path::joinPaths($templatePath, $file)); } rmdir($templatePath); } $this->extTablesFacade->save(); $extEmconfFacade->save(); }