id)) { mkdir(VendorPath. $vendor->id, 0777, true); } } public function onAfterVendorDelete(&$vendor) { if (!file_exists(VendorPath . "deleted")) { mkdir(VendorPath. "deleted", 0777, true); } if (!file_exists(VendorPath . $vendor->id)) { rename(VendorPath. $vendor->id, VendorPath. "deleted". $vendor->id, true); } } }