Exemplo n.º 1
0
    protected function addIncludes(&$script)
    {
        if (!DataModelBuilder::getBuildProperty('builderAddIncludes')) {
            return;
        }
        parent::addIncludes($script);
        // include the i18n classes if needed
        if ($this->getTable()->getAttribute('isI18N')) {
            $relatedTable = $this->getDatabase()->getTable($this->getTable()->getAttribute('i18nTable'));
            $script .= '
require_once \'' . ClassTools::getFilePath($this->getStubObjectBuilder()->getPackage() . '.', $relatedTable->getPhpName() . 'Peer') . '\';
require_once \'' . ClassTools::getFilePath($this->getStubObjectBuilder()->getPackage() . '.', $relatedTable->getPhpName()) . '\';
';
        }
    }