function shrinktheweb_generateOptions in ShrinkTheWeb 8
Same name and namespace in other branches
- 6 shrinktheweb.api.inc \shrinktheweb_generateOptions()
- 7 shrinktheweb.api.inc \shrinktheweb_generateOptions()
Generate options. !!! SLIGHTLY CHANGED FOR DRUPAL !!!
Parameters
$aOptions:
Return value
mixed
4 calls to shrinktheweb_generateOptions()
- shrinktheweb_deleteThumbnail in ./
shrinktheweb.api.inc - Delete thumbnail.
- shrinktheweb_getNoResponseImage in ./
shrinktheweb.api.inc - Gets the account problem image and returns the relative path to the cached image.
- shrinktheweb_getThumbnailURL in ./
shrinktheweb.api.inc - Gets the thumbnail for the specified website, stores it in the cache, and then returns the HTML for loading the image. !!! SLIGHTLY CHANGED FOR DRUPAL !!!
- shrinktheweb_refreshThumbnail in ./
shrinktheweb.api.inc - Refresh a thumbnail for a url with specified options. First delete it and then do a new request and return the HTML for image loading. !!! SLIGHTLY CHANGED FOR DRUPAL !!!
File
- ./
shrinktheweb.api.inc, line 191
Code
function shrinktheweb_generateOptions($aOptions) {
// Check if there are options set, otherwise set it to default or false.
$config = \Drupal::config('shrinktheweb.settings');
$aOptions['Size'] = isset($aOptions['Size']) ? $aOptions['Size'] : $config
->get('shrinktheweb_thumb_size');
$aOptions['SizeCustom'] = isset($aOptions['SizeCustom']) ? $aOptions['SizeCustom'] : $config
->get('shrinktheweb_thumb_size_custom');
$aOptions['FullSizeCapture'] = isset($aOptions['FullSizeCapture']) ? $aOptions['FullSizeCapture'] : $config
->get('shrinktheweb_full_size');
$aOptions['MaxHeight'] = isset($aOptions['MaxHeight']) ? $aOptions['MaxHeight'] : $config
->get('shrinktheweb_max_height');
$aOptions['NativeResolution'] = isset($aOptions['NativeResolution']) ? $aOptions['NativeResolution'] : $config
->get('shrinktheweb_native_res');
$aOptions['WidescreenY'] = isset($aOptions['WidescreenY']) ? $aOptions['WidescreenY'] : $config
->get('shrinktheweb_widescreen_y');
$aOptions['RefreshOnDemand'] = isset($aOptions['RefreshOnDemand']) ? $aOptions['RefreshOnDemand'] : FALSE;
$aOptions['Delay'] = isset($aOptions['Delay']) ? $aOptions['Delay'] : $config
->get('shrinktheweb_delay');
$aOptions['Quality'] = isset($aOptions['Quality']) ? $aOptions['Quality'] : $config
->get('shrinktheweb_quality');
return $aOptions;
}