Author: francois
Date: 2010-04-22 14:36:22 +0200 (Thu, 22 Apr 2010)
New Revision: 29235
Modified:
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/deleteAction.php
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/editAction.php
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/indexAction.php
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/updateAction.php
Log:
[sfPropel15Plugin] Updated CRUD generator
Modified:
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/deleteAction.php
===================================================================
---
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/deleteAction.php
2010-04-22 11:58:42 UTC (rev 29234)
+++
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/deleteAction.php
2010-04-22 12:36:22 UTC (rev 29235)
@@ -5,7 +5,8 @@
<?php if (isset($this->params['with_propel_route']) &&
$this->params['with_propel_route']): ?>
$this->getRoute()->getObject()->delete();
<?php else: ?>
- $this->forward404Unless($<?php echo $this->getSingularName() ?> = <?php
echo constant($this->getModelClass().'::PEER') ?>::retrieveByPk(<?php echo
$this->getRetrieveByPkParamsForAction(43) ?>), sprintf('Object <?php echo
$this->getSingularName() ?> does not exist (%s).', <?php echo
$this->getRetrieveByPkParamsForAction(43) ?>));
+ $<?php echo $this->getSingularName() ?> = <?php echo
$this->getModelClass() ?>Query::create()->findPk(<?php echo
$this->getRetrieveByPkParamsForAction(43) ?>);
+ $this->forward404Unless($<?php echo $this->getSingularName() ?>,
sprintf('Object <?php echo $this->getSingularName() ?> does not exist (%s).',
<?php echo $this->getRetrieveByPkParamsForAction(43) ?>));
$<?php echo $this->getSingularName() ?>->delete();
<?php endif; ?>
Modified:
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/editAction.php
===================================================================
---
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/editAction.php
2010-04-22 11:58:42 UTC (rev 29234)
+++
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/editAction.php
2010-04-22 12:36:22 UTC (rev 29235)
@@ -3,7 +3,8 @@
<?php if (isset($this->params['with_propel_route']) &&
$this->params['with_propel_route']): ?>
$this->form = new <?php echo $this->getModelClass().'Form'
?>($this->getRoute()->getObject());
<?php else: ?>
- $this->forward404Unless($<?php echo $this->getSingularName() ?> = <?php
echo constant($this->getModelClass().'::PEER') ?>::retrieveByPk(<?php echo
$this->getRetrieveByPkParamsForAction(43) ?>), sprintf('Object <?php echo
$this->getSingularName() ?> does not exist (%s).', <?php echo
$this->getRetrieveByPkParamsForAction(43) ?>));
+ $<?php echo $this->getSingularName() ?> = <?php echo
$this->getModelClass() ?>Query::create()->findPk(<?php echo
$this->getRetrieveByPkParamsForAction(43) ?>);
+ $this->forward404Unless($<?php echo $this->getSingularName() ?>,
sprintf('Object <?php echo $this->getSingularName() ?> does not exist (%s).',
<?php echo $this->getRetrieveByPkParamsForAction(43) ?>));
$this->form = new <?php echo $this->getModelClass().'Form' ?>($<?php echo
$this->getSingularName() ?>);
<?php endif; ?>
}
Modified:
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/indexAction.php
===================================================================
---
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/indexAction.php
2010-04-22 11:58:42 UTC (rev 29234)
+++
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/indexAction.php
2010-04-22 12:36:22 UTC (rev 29235)
@@ -3,6 +3,6 @@
<?php if (isset($this->params['with_propel_route']) &&
$this->params['with_propel_route']): ?>
$this-><?php echo $this->getPluralName() ?> =
$this->getRoute()->getObjects();
<?php else: ?>
- $this-><?php echo $this->getPluralName() ?> = <?php echo
constant($this->getModelClass().'::PEER') ?>::doSelect(new Criteria());
+ $this-><?php echo $this->getPluralName() ?> = <?php echo
$this->getModelClass() ?>Query::create()->find();
<?php endif; ?>
}
Modified:
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/updateAction.php
===================================================================
---
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/updateAction.php
2010-04-22 11:58:42 UTC (rev 29234)
+++
plugins/sfPropel15Plugin/trunk/data/generator/sfPropelModule/default/parts/updateAction.php
2010-04-22 12:36:22 UTC (rev 29235)
@@ -4,7 +4,8 @@
$this->form = new <?php echo $this->getModelClass().'Form'
?>($this->getRoute()->getObject());
<?php else: ?>
$this->forward404Unless($request->isMethod(sfRequest::POST) ||
$request->isMethod(sfRequest::PUT));
- $this->forward404Unless($<?php echo $this->getSingularName() ?> = <?php
echo constant($this->getModelClass().'::PEER') ?>::retrieveByPk(<?php echo
$this->getRetrieveByPkParamsForAction(43) ?>), sprintf('Object <?php echo
$this->getSingularName() ?> does not exist (%s).', <?php echo
$this->getRetrieveByPkParamsForAction(43) ?>));
+ $<?php echo $this->getSingularName() ?> = <?php echo
$this->getModelClass() ?>Query::create()->findPk(<?php echo
$this->getRetrieveByPkParamsForAction(43) ?>);
+ $this->forward404Unless($<?php echo $this->getSingularName() ?>,
sprintf('Object <?php echo $this->getSingularName() ?> does not exist (%s).',
<?php echo $this->getRetrieveByPkParamsForAction(43) ?>));
$this->form = new <?php echo $this->getModelClass().'Form' ?>($<?php echo
$this->getSingularName() ?>);
<?php endif; ?>
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.