public function importBoard($id, $newJournalId)
{
$settingsSql = "SELECT setting_value, locale FROM group_settings WHERE group_id = :id";
$settingsStatement = $this->dbalConnection->prepare($settingsSql);
$settingsStatement->bindValue('id', $id);
$settingsStatement->execute();
$results = $settingsStatement->fetchAll();
if (count($results) == 0) {
return null;
}
$journal = $this->em->getReference('OjsJournalBundle:Journal', $newJournalId);
$board = new Board();
$board->setJournal($journal);
foreach ($results as $result) {
$board->setCurrentLocale(mb_substr($result['locale'], 0, 2, 'UTF-8'));
$board->setName($result['setting_value']);
}
return $board;
}