function Media::shouldUpdateThumbnail
Determines if the thumbnail should be updated for a media item.
Parameters
bool $is_new: Specifies whether the media item is new.
Return value
bool TRUE if the thumbnail should be updated, FALSE otherwise.
File
- 
              core/
modules/ media/ src/ Entity/ Media.php, line 359  
Class
- Media
 - Defines the media entity class.
 
Namespace
Drupal\media\EntityCode
protected function shouldUpdateThumbnail($is_new = FALSE) {
  // Update thumbnail if we don't have a thumbnail yet or when the source
  // field value changes.
  return !$this->get('thumbnail')->entity || $is_new || $this->hasSourceFieldChanged();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.