Cav
Cav

Reputation: 162

Symfony 1.4 change admin generator actions or templates

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

Upvotes: 3

Views: 2593

Answers (1)

Raise
Raise

Reputation: 2034

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

Upvotes: 5

Related Questions