mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
baked controller code generates no errors
This commit is contained in:
parent
8060dd57d3
commit
5b507636c7
2 changed files with 33 additions and 29 deletions
|
@ -31,6 +31,7 @@
|
|||
/**
|
||||
* <?php echo $admin ?>view method
|
||||
*
|
||||
* @throws NotFoundException
|
||||
* @param string $id
|
||||
* @return void
|
||||
*/
|
||||
|
@ -85,6 +86,7 @@
|
|||
/**
|
||||
* <?php echo $admin ?>edit method
|
||||
*
|
||||
* @throws NotFoundException
|
||||
* @param string $id
|
||||
* @return void
|
||||
*/
|
||||
|
@ -129,6 +131,8 @@
|
|||
/**
|
||||
* <?php echo $admin ?>delete method
|
||||
*
|
||||
* @throws MethodNotAllowedException
|
||||
* @throws NotFoundException
|
||||
* @param string $id
|
||||
* @return void
|
||||
*/
|
||||
|
@ -154,4 +158,4 @@
|
|||
$this->flash(__('<?php echo ucfirst(strtolower($singularHumanName)); ?> was not deleted'), array('action' => 'index'));
|
||||
<?php endif; ?>
|
||||
$this->redirect(array('action' => 'index'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,36 +46,36 @@ class <?php echo $controllerName; ?>Controller extends <?php echo $plugin; ?>App
|
|||
* @var mixed
|
||||
*/
|
||||
public $scaffold;
|
||||
<?php else: ?>
|
||||
<?php
|
||||
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";
|
||||
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";
|
||||
endif;
|
||||
<?php else:
|
||||
|
||||
echo $actions;
|
||||
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;
|
||||
|
||||
echo trim($actions) . "\n";
|
||||
|
||||
endif; ?>
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue