public function Table::update in Data 8
Update table properties.
@todo: make conditional, rename to save().
Parameters
$properties: Array where the key designates a property (one of 'name', 'title', 'table_schema', 'meta') and the value is the unserialized value that this property should attain.
12 calls to Table::update()
- Table::addField in src/
Table.php - Add a field.
- Table::addIndex in src/
Table.php - Add an index to table.
- Table::addPrimaryKey in src/
Table.php - Add a primary key to table.
- Table::addUniqueKey in src/
Table.php - Add a unique key to a field.
- Table::changeField in src/
Table.php - Change a field.
File
- src/
Table.php, line 230
Class
- Table
- 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.
Namespace
Drupal\dataCode
public function update($properties) {
//_data_override($this->name);
$properties['name'] = $this->name;
if (drupal_write_record('data_tables', $properties, 'name')) {
foreach ($properties as $key => $value) {
$this->{$key} = $value;
}
}
}