function fe_paths_usage in File Entity Paths 7.2
Get a file File Entity Paths configuration usage. It determine, which configuration, by which entity is applied on the file.
Parameters
$fid:
bool $reset:
Return value
bool
2 calls to fe_paths_usage()
- fe_paths_file_process in ./
fe_paths.module - Actually pre processes the files. Set a $file->fe_paths_processed flag on the file entity, then add to process queue. The file will be processed on drupal_register_shutdown.
- fe_paths_usage_add in ./
fe_paths.module - Add or update a fe_paths usage record to the database.
2 string references to 'fe_paths_usage'
- fe_paths_update_7001 in ./
fe_paths.install - Implements hook_update_7001();
- fe_paths_usage_add in ./
fe_paths.module - Add or update a fe_paths usage record to the database.
File
- ./
fe_paths.module, line 653 - Contains functions for the File Entity Paths module.
Code
function fe_paths_usage($fid, $reset = FALSE) {
$usage = drupal_static(__FUNCTION__);
if (isset($usage[$fid]) && !$reset) {
return $usage[$fid];
}
$result = db_select('fe_paths_usage', 'fep')
->fields('fep')
->condition('fid', $fid)
->execute()
->fetchAllAssoc('fid');
if (!$result) {
return FALSE;
}
else {
$usage[$fid] = $result[$fid];
}
return $usage[$fid];
}