开发者

Symfony 1.4 change admin generator actions or templates

开发者 https://www.devze.com 2022-12-28 05:33 出处:网络
how can I modify admin generated modules (acions and template开发者_JS百科s)? They are stored in cache but I need to modify them (templates!). Is it possible at all?

how can I modify admin generated modules (acions and template开发者_JS百科s)? They are stored in cache but I need to modify them (templates!). Is it possible at all?

Greetings


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');
  }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号