/** * delete the customer selected * @param $customerid * @return Boolean */ public static function del($customerid) { // Delete all the domains Domains::delete_by_customerid($customerid); // Delete all the references of the customers CustomersDomainsRegistrars::del($customerid); // Delete all the orders Orders::DeleteByCustomerID($customerid); // Delete all the customer's files Files::delete_all_by_customerId($customerid); return Doctrine_Query::create()->delete('Customers')->where('customer_id = ?', $customerid)->execute(); }