Files
grzanieplus.pl/plugins/stLanguagePlugin/lib/model/LanguageTranslationMapBuilder.php
2025-03-12 17:06:23 +01:00

59 lines
1.8 KiB
PHP

<?php
class LanguageTranslationMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'plugins.stLanguagePlugin.lib.model.LanguageTranslationMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('propel');
$tMap = $this->dbMap->addTable('st_language_translation');
$tMap->setPhpName('LanguageTranslation');
$tMap->addPrimaryKey('CATALOGUE', 'Catalogue', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addPrimaryKey('INDEX', 'Index', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addPrimaryKey('LANGUAGE_ID', 'LanguageId', 'int', CreoleTypes::VARCHAR, true);
$tMap->addColumn('PHRASE', 'Phrase', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('BACKEND_PHRASE', 'BackendPhrase', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('DEFAULT_PHRASE_TRANSLATION', 'DefaultPhraseTranslation', 'string', CreoleTypes::VARCHAR, true, 255);
$tMap->addColumn('USER_PHRASE_TRANSLATION', 'UserPhraseTranslation', 'string', CreoleTypes::VARCHAR, false, 255);
} // doBuild()
}