Code : Tout sélectionner
404 | Not Found | sfError404Exception
Action "general/action" does not exist.j'ai cette URL
Code : Tout sélectionner
http://localhost/monprojet/web/frontend_dev.php/general/showInfos/action?id_hardware=2Code : Tout sélectionner
http://localhost/monprojet/web/frontend_dev.php/general/2/showInfosj'ai juste rajouter dans generator.yml une nouvelle action
Code : Tout sélectionner
object_actions:
_edit: { label: Editer }
showInfos: { label: Infos , action: showInfos } Code : Tout sélectionner
public function executeShowInfos (sfWebRequest $request)
{
$this->hardware = $this->getRoute()->getObject();
$this->setTemplate('showInfos');
}Code : Tout sélectionner
<td>
<ul class="sf_admin_td_actions">
<?php echo $helper->linkToEdit($hardware, array( 'label' => 'Editer', 'params' => array( ), 'class_suffix' => 'edit',)) ?>
<li class="sf_admin_action_show">
<?php echo link_to(__('Infos', array(), 'messages'), 'general/showInfos?id_hardware='.$hardware->getIdHardware(), array()) ?>
</li>
</ul>
</td>Code : Tout sélectionner
Match route "hardware_object" (/general/:idHardware/:action.:sf_format) for /general/showInfos/action with parameters array ( 'module' => 'general', 'action' => 'action', 'sf_format' => 'html', 'idHardware' => 'showInfos',)merci pour votre aide