Implements Drupal\file\FileUsage\FileUsageInterface::add().
Overrides FileUsageBase::add
public function add(File $file, $module, $type, $id, $count = 1) {
$this->connection
->merge($this->tableName)
->key(array(
'fid' => $file->fid,
'module' => $module,
'type' => $type,
'id' => $id,
))
->fields(array(
'count' => $count,
))
->expression('count', 'count + :count', array(
':count' => $count,
))
->execute();
parent::add($file, $module, $type, $id, $count);
}