I have a problem with the afterDelete callback method. I can\'t use them.
Inside one of my \"Storages\" plugin controllers I want to delete a record and after that I wan
As can be seen in the debugging results, $this->StoragecontainerBlockElements
is not what you thought it is, it is a so called "auto-table" or "generic table", that is, an instance of \Cake\ORM\Table
instead of a concrete subclass thereof.
Your StoragecontainerBlockElementsTable
class/file cannot be found/loaded for some reason, hence the fallback to \Cake\ORM\Table
. Might be caused by
See also
Try
use Cake\Log\Log;
use Cake\ORM\Table;
class StoragecontainerBlockElementsTable extends Table {
public function afterDelete($event, $entity, $options){
Log::debug('Got here');
}
}
Details Here