mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +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; ?>';
|
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
|
||||||
|
|
Loading…
Reference in a new issue