I am overriding the standard AR delete method so that instead of using deleteByPk() it will use a new function:
public function retireByPk($pk,$condition='',$params=array())
Every table in the DB has a column called state. When something is ‘deleted’ its state changes to 2. Thats what the retireByPk function will achieve.
I need to create a new method createRetireCommand in an extension of CDbCommandBuilder however am not sure how to extend this class - what new files do I need & where in my project do I have to reference it?