You are here

function _colorized_gmap_marker_info in Colorized google maps block 7

Load file info.

Parameters

int $fid: File id.

int $delta: Block delta.

Return value

array Array contains file url and fid.

4 calls to _colorized_gmap_marker_info()
colorized_gmap_block_save in ./colorized_gmap.module
Implements hook_block_save().
colorized_gmap_form_alter in ./colorized_gmap.module
Implements hook_form_alter().
_colorized_gmap_form_map_marker in ./colorized_gmap.admin.inc
Helper function. Create form elements for map marker settings.
_colorized_gmap_get_map_js_settings in ./colorized_gmap.module
Prepare map style values to pass to js.

File

./colorized_gmap.module, line 486
Colorized gmap module.

Code

function _colorized_gmap_marker_info($fid, $delta) {
  $file = file_load($fid);
  $marker = array();
  if ($file != FALSE) {
    $file->status = FILE_STATUS_PERMANENT;
    $marker = array(
      'fid' => $file->fid,
      'url' => file_create_url($file->uri),
    );
    file_save($file);
    file_usage_add($file, 'colorized_gmap', 'colorized_gmap', $delta);
  }
  return $marker;
}