I have a CakePHP Console Shell that works fine until a Model->afterFind() tries to add some data to the results which includes adding links, which doesn’t seem to work while being called from the Console.
Is there a way to test in the Model->afterFind() callback function whether it’s being called from a Console Shell, so that I can skip the troublesome section that I don’t need anyway?
Thanks,
Ian
I’m not too sure whether there’s a Cake way to do it, but you can do it via regular PHP