/** * This copies all fixtures named *.yml.sample in the data/fixtures/project * directory of each plugin */ protected function _copyFixtures() { $this->logSection('fixtures', 'Coping "project" fixtures into data/fixture/sympal directory'); // get all the "sympal" plugins $paths = $this->_configuration->getPluginConfiguration('sfSympalPlugin')->getSympalConfiguration()->getPluginPaths(); // process the yaml files in /data/fixtures/project/*.sample.yml of each plugin foreach ($paths as $path) { $yamls = sfFinder::type('file')->name('*.yml.sample')->in($path . '/data/fixtures/project'); foreach ($yamls as $yaml) { sfSympalInstallToolkit::processSampleYamlFile($yaml, sfConfig::get('sf_data_dir') . '/fixtures/sympal', $this, true); } } }
/** * Copies the site fixtures from the plugin directories to the * data/fixtures/app_name directory * * @param string $application */ protected function _copyFixtures($application) { $targetDir = sfConfig::get('sf_data_dir') . '/fixtures/sympal/' . $application; $this->logSection('fixtures', sprintf('Coping "site" fixtures into data/fixture/sympal/%s directory', $application)); // get all the "sympal" plugins $paths = $this->configuration->getPluginConfiguration('sfSympalPlugin')->getSympalConfiguration()->getPluginPaths(); // process the yaml files in /data/fixtures/project/*.sample.yml of each plugin foreach ($paths as $path) { $yamls = sfFinder::type('file')->name('*.yml.sample')->in($path . '/data/fixtures/site'); foreach ($yamls as $yaml) { sfSympalInstallToolkit::processSampleYamlFile($yaml, $targetDir, $this); } } }