Skip to content

Commit

Permalink
consider addClassLevelComment config in all extension classes
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan committed Feb 16, 2016
1 parent 4157132 commit eb4e5d3
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 20 deletions.
17 changes: 10 additions & 7 deletions src/Propel/Generator/Builder/Om/ExtensionQueryBuilder.php
Expand Up @@ -41,26 +41,29 @@ protected function addClassOpen(&$script)
$tableDesc = $table->getDescription();
$baseClassName = $this->getClassNameFromBuilder($this->getQueryBuilder());

$script .= "
if ($this->getBuildProperty('generator.objectModel.addClassLevelComment')) {
$script .= "
/**
* Skeleton subclass for performing query and update operations on the '$tableName' table.
*
* $tableDesc
*";
if ($this->getBuildProperty('generator.objectModel.addTimeStamp')) {
$now = strftime('%c');
$script .= "
if ($this->getBuildProperty('generator.objectModel.addTimeStamp')) {
$now = strftime('%c');
$script .= "
* This class was autogenerated by Propel " . $this->getBuildProperty('general.version') . " on:
*
* $now
*";
}
$script .= "
}
$script .= "
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
*/";
}
$script .= "
class ".$this->getUnqualifiedClassName()." extends $baseClassName
{
";
Expand Down
Expand Up @@ -88,27 +88,30 @@ protected function addClassOpen(&$script)
$baseBuilder = $this->getNewQueryInheritanceBuilder($this->getChild());
$baseClassName = $this->getClassNameFromBuilder($baseBuilder);

$script .= "
if ($this->getBuildProperty('generator.objectModel.addClassLevelComment')) {
$script .= "
/**
* Skeleton subclass for representing a query for one of the subclasses of the '$tableName' table.
*
* $tableDesc
*";
if ($this->getBuildProperty('generator.objectModel.addTimeStamp')) {
$now = strftime('%c');
$script .= "
if ($this->getBuildProperty('generator.objectModel.addTimeStamp')) {
$now = strftime('%c');
$script .= "
* This class was autogenerated by Propel " . $this->getBuildProperty('general.version') . " on:
*
* $now
*";
}
$script .= "
}
$script .= "
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
*/";
}
$script .= "
class " .$this->getUnqualifiedClassName() . " extends " . $baseClassName . "
{
";
Expand Down
15 changes: 9 additions & 6 deletions src/Propel/Generator/Builder/Om/MultiExtendObjectBuilder.php
Expand Up @@ -131,27 +131,30 @@ protected function addClassOpen(&$script)
$tableName = $table->getName();
$tableDesc = $table->getDescription();

$script .= "
if ($this->getBuildProperty('generator.objectModel.addClassLevelComment')) {
$script .= "
/**
* Skeleton subclass for representing a row from one of the subclasses of the '$tableName' table.
*
* $tableDesc
*";
if ($this->getBuildProperty('generator.objectModel.addTimeStamp')) {
$now = strftime('%c');
$script .= "
if ($this->getBuildProperty('generator.objectModel.addTimeStamp')) {
$now = strftime('%c');
$script .= "
* This class was autogenerated by Propel " . $this->getBuildProperty('general.version') . " on:
*
* $now
*";
}
$script .= "
$script .= "
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
*/";
}
$script .= "
class ".$this->getUnqualifiedClassName()." extends ".$this->getParentClassName()."
{
";
Expand Down

0 comments on commit eb4e5d3

Please sign in to comment.