public function delete($pk = null) { if ($pk) { $qtcshiphelper = new qtcshiphelper(); // Check whether zone is allowed to delete or not. If not the enqueue error message accordingly. $count_id = $qtcshiphelper->isAllowedToDelShipProfile($pk); if ($count_id === true) { $this->load($pk); $result = parent::delete($pk); if ($result) { } return $result; } } return false; }