You are here

public function DataTable::revert in Data 7

Same name and namespace in other branches
  1. 6 includes/DataTable.inc \DataTable::revert()

Revert a table to its definition in code.

Does not revert a table if it is not defined in code.

Return value

TRUE if the table was reverted, FALSE otherwise.

File

includes/DataTable.inc, line 531
Contains class definition for DataTable.

Class

DataTable
Manages data access and manipulation for a single data table. Use data_create_table() or data_get_table() to instantiate an object from this class.

Code

public function revert() {
  if ($this->export_type & EXPORT_IN_CODE) {
    db_delete('data_tables')
      ->condition('name', $this->name)
      ->execute();
    return TRUE;
  }
  return FALSE;
}