mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
updating model bake tempalte to meet code standards
This commit is contained in:
parent
5b507636c7
commit
39a53fe0e2
1 changed files with 8 additions and 5 deletions
|
@ -45,12 +45,14 @@ class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {
|
|||
*/
|
||||
public $useDbConfig = '<?php echo $useDbConfig; ?>';
|
||||
|
||||
<?php endif;?>
|
||||
<?php if ($useTable && $useTable !== Inflector::tableize($name)):
|
||||
$table = "'$useTable'";
|
||||
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
|
||||
echo "\tpublic \$useTable = $table;\n\n";
|
||||
<?php endif;
|
||||
|
||||
if ($useTable && $useTable !== Inflector::tableize($name)):
|
||||
$table = "'$useTable'";
|
||||
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
|
||||
echo "\tpublic \$useTable = $table;\n\n";
|
||||
endif;
|
||||
|
||||
if ($primaryKey !== 'id'): ?>
|
||||
/**
|
||||
* Primary key field
|
||||
|
@ -60,6 +62,7 @@ if ($primaryKey !== 'id'): ?>
|
|||
public $primaryKey = '<?php echo $primaryKey; ?>';
|
||||
|
||||
<?php endif;
|
||||
|
||||
if ($displayField): ?>
|
||||
/**
|
||||
* Display field
|
||||
|
|
Loading…
Reference in a new issue