mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
indentation in templates
This commit is contained in:
parent
70ac1c7e33
commit
e1357ca8aa
2 changed files with 28 additions and 28 deletions
|
@ -49,33 +49,33 @@ class <?php echo $controllerName; ?>Controller extends <?php echo $plugin; ?>App
|
|||
|
||||
<?php else:
|
||||
|
||||
if (count($helpers)):
|
||||
echo "/**\n * Helpers\n *\n * @var array\n */\n";
|
||||
echo "\tpublic \$helpers = array(";
|
||||
for ($i = 0, $len = count($helpers); $i < $len; $i++):
|
||||
if ($i != $len - 1):
|
||||
echo "'" . Inflector::camelize($helpers[$i]) . "', ";
|
||||
else:
|
||||
echo "'" . Inflector::camelize($helpers[$i]) . "'";
|
||||
endif;
|
||||
endfor;
|
||||
echo ");\n\n";
|
||||
endif;
|
||||
if (count($helpers)):
|
||||
echo "/**\n * Helpers\n *\n * @var array\n */\n";
|
||||
echo "\tpublic \$helpers = array(";
|
||||
for ($i = 0, $len = count($helpers); $i < $len; $i++):
|
||||
if ($i != $len - 1):
|
||||
echo "'" . Inflector::camelize($helpers[$i]) . "', ";
|
||||
else:
|
||||
echo "'" . Inflector::camelize($helpers[$i]) . "'";
|
||||
endif;
|
||||
endfor;
|
||||
echo ");\n\n";
|
||||
endif;
|
||||
|
||||
if (count($components)):
|
||||
echo "/**\n * Components\n *\n * @var array\n */\n";
|
||||
echo "\tpublic \$components = array(";
|
||||
for ($i = 0, $len = count($components); $i < $len; $i++):
|
||||
if ($i != $len - 1):
|
||||
echo "'" . Inflector::camelize($components[$i]) . "', ";
|
||||
else:
|
||||
echo "'" . Inflector::camelize($components[$i]) . "'";
|
||||
endif;
|
||||
endfor;
|
||||
echo ");\n\n";
|
||||
endif;
|
||||
if (count($components)):
|
||||
echo "/**\n * Components\n *\n * @var array\n */\n";
|
||||
echo "\tpublic \$components = array(";
|
||||
for ($i = 0, $len = count($components); $i < $len; $i++):
|
||||
if ($i != $len - 1):
|
||||
echo "'" . Inflector::camelize($components[$i]) . "', ";
|
||||
else:
|
||||
echo "'" . Inflector::camelize($components[$i]) . "'";
|
||||
endif;
|
||||
endfor;
|
||||
echo ");\n\n";
|
||||
endif;
|
||||
|
||||
echo trim($actions) . "\n";
|
||||
echo trim($actions) . "\n";
|
||||
|
||||
endif; ?>
|
||||
}
|
||||
|
|
|
@ -48,9 +48,9 @@ class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {
|
|||
<?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";
|
||||
$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'): ?>
|
||||
|
|
Loading…
Add table
Reference in a new issue