2

I am working on zend framework. I have mistakenly created some actions which are not useful for me now. So either I want to remove those actions or rename them. Is there any command by which I can do that. If no, how can I do it manually? Means which are the files I need to edit to remove or rename the action completely.

Sourabh
  • 1,757
  • 6
  • 21
  • 43

1 Answers1

2

I think it should be enough to remove the xxxxxAction() methods from your controllers. This is how I've always done it. If you have view scripts associated to the action it's good to remove them too, for housekeeping purposes, although it's not strictly necessary. If you are using Zend_Tool, you'll also need to edit your .zfproject.xml file (it's used only by Zend_Tool).

Perhaps there is another way of doing it, using Zend_Tool, but I'm more used to work "the manual way".

EDIT:

Actually, there is a similar question already posted: Zend_Tool remove controller/action

Hope that helps...

Community
  • 1
  • 1
dinopmi
  • 2,683
  • 19
  • 24
  • Well, I got answer from somewhere else. I think, It also needs to be removed from the .project.xml file other wise it will create problems while routing with indexController. In addition, view files should also be removed for memory management purpose. – Sourabh Sep 14 '11 at 15:27
  • @Sourabh: Yes, you are right. I overlooked the part about view files. I've just edited my answer to add the missing information. – dinopmi Sep 15 '11 at 06:56