public function FeedsDataHandler::update in Feeds 6
Updates a multi-dimensional record.
Assumes that updates occur on keys. Does not support any other form of updates.
Parameters
$record: An array of the record to update. Keys are the names of fields or names of joining tables. At least one key name in $record must match $this->key.
Overrides DataHandler::update
See also
insert().
File
- includes/
FeedsDataHandler.inc, line 140 - Data handler used in FeedsDataProcessor.
Class
- FeedsDataHandler
- Simple multidimensional data handler. Treats tables that join to this handler's table through FeedsDatahandler::key as a cluster. Records in this cluster are regarded as belonging to one multidimensional data set joined by FeedsDatahandler::key.
Code
public function update(&$record) {
parent::update($record, $this->key);
foreach ($record as $key => $value) {
if ($handler = $this
->joinedTableHandler($key)) {
foreach ($value as $v) {
$handler
->update($v, $this->key);
}
}
}
}