public static function MediaWatermark::prepareNames in Media watermark 8
Function to return watermark names array.
Parameters
array $results: Watermarks array.
Return value
array names array
1 call to MediaWatermark::prepareNames()
- BatchWatermarkForm::getWatermarksOptions in src/
Form/ BatchWatermarkForm.php - Helper to get Watermarks options array or watermark id.
File
- src/
Entity/ MediaWatermark.php, line 169
Class
- MediaWatermark
- Defines the media_watermark entity.
Namespace
Drupal\media_watermark\EntityCode
public static function prepareNames(array $results) {
$names = [];
foreach ($results as $value) {
$fids = $value
->getFid();
if (!empty($fids)) {
$fid = reset($fids);
$names[$fid] = $value
->id();
}
}
return $names;
}