【问题标题】:Symfony 1.4 change admin generator actions or templatesSymfony 1.4 更改管理员生成器操作或模板
【发布时间】:2010-04-21 22:43:02
【问题描述】:

如何修改管理员生成的模块(动作和模板)?它们存储在缓存中,但我需要修改它们(模板!)。有可能吗?

问候

【问题讨论】:

    标签: templates symfony1 admin generator action


    【解决方案1】:

    当然可以 - 只需将模板文件从缓存复制到模板后端的相关 module/templates 文件夹中,然后修改/扩展。

    对于动作,将同名动作添加到module/actions/actions.class.php 文件中,并根据需要对其进行扩展,例如:

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

    【讨论】:

      猜你喜欢
      • 2011-06-21
      • 2011-06-07
      • 1970-01-01
      • 2011-09-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多