updating model bake tempalte to meet code standards

This commit is contained in:
AD7six 2012-05-10 00:35:51 +02:00
parent 5b507636c7
commit 39a53fe0e2

View file

@ -45,12 +45,14 @@ class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {
*/ */
public $useDbConfig = '<?php echo $useDbConfig; ?>'; public $useDbConfig = '<?php echo $useDbConfig; ?>';
<?php endif;?> <?php endif;
<?php if ($useTable && $useTable !== Inflector::tableize($name)):
if ($useTable && $useTable !== Inflector::tableize($name)):
$table = "'$useTable'"; $table = "'$useTable'";
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n"; echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
echo "\tpublic \$useTable = $table;\n\n"; echo "\tpublic \$useTable = $table;\n\n";
endif; endif;
if ($primaryKey !== 'id'): ?> if ($primaryKey !== 'id'): ?>
/** /**
* Primary key field * Primary key field
@ -60,6 +62,7 @@ if ($primaryKey !== 'id'): ?>
public $primaryKey = '<?php echo $primaryKey; ?>'; public $primaryKey = '<?php echo $primaryKey; ?>';
<?php endif; <?php endif;
if ($displayField): ?> if ($displayField): ?>
/** /**
* Display field * Display field