Symfony 1.4 change admin generator actions or templates

╄→尐↘猪︶ㄣ 提交于 2019-12-06 06:35:27

问题


how can I modify admin generated modules (acions and templates)? They are stored in cache but I need to modify them (templates!). Is it possible at all?

Greetings


回答1:


Sure is - just copy the template files from the cache to the relevant module/templates folder in the backend for templates and then modify/extend.

For actions, add the same named action to the module/actions/actions.class.php file, and extend it as necessary, e.g.:

apps/backend/modules/blah/actions/actions.class.php:

class blahActions extends autoBlahActions
{
  public function updateBlahFromRequest()
  {
    //handle the form submission
    parent::updateBlahFromRequest();

    //do some custom tasks
    $this->logMessage('Object updated');
  }
}


来源:https://stackoverflow.com/questions/2687058/symfony-1-4-change-admin-generator-actions-or-templates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!