end module activation

This commit is contained in:
Manuel Raynaud
2013-10-18 10:06:42 +02:00
parent 52ed89f1aa
commit e602884ce0
3 changed files with 8 additions and 8 deletions

View File

@@ -135,17 +135,19 @@ abstract class BaseModule extends ContainerAware
}
}
public function deployImageFolder(Module $module, $folderPath)
public function deployImageFolder(Module $module, $folderPath, ConnectionInterface $con = null)
{
try {
$directoryBrowser = new \DirectoryIterator($folderPath);
} catch (\UnexpectedValueException $e) {
throw $e;
}
if(null === $con) {
$con = \Propel\Runtime\Propel::getConnection(
ModuleImageTableMap::DATABASE_NAME
);
}
$con = \Propel\Runtime\Propel::getConnection(
ModuleImageTableMap::DATABASE_NAME
);
/* browse the directory */
$imagePosition = 1;