protected function elFinderDrupal::downloadcount in elFinder file manager 8.2
File
- src/
Controller/ elFinderDrupal.php, line 142 - elFinder conenctor class
Class
- elFinderDrupal
- @file
Namespace
Drupal\elfinder\ControllerCode
protected function downloadcount($args) {
$target = $args['target'];
$error = array(
self::ERROR_UNKNOWN,
'#' . $target,
);
if (($volume = $this
->volume($target)) == FALSE || ($file = $volume
->file($target)) == FALSE) {
return array(
'error' => $this
->error($error, self::ERROR_FILE_NOT_FOUND),
);
}
$error[1] = $file['name'];
if ($volume
->driverId() == 'f') {
return array(
'downloadcount' => '',
);
}
if ($volume
->commandDisabled('downloadcount')) {
return array(
'error' => $this
->error($error, self::ERROR_ACCESS_DENIED),
);
}
if (($downloadcount = $volume
->downloadcount($target)) == FALSE) {
return array(
'error' => $this
->error($error, $volume
->error()),
);
}
return array(
'downloadcount' => $downloadcount,
);
}