allow type to be passed

This commit is contained in:
Andy Miller
2018-04-18 10:43:27 -06:00
parent b6e0f8b75a
commit a49f3d460e

View File

@@ -402,12 +402,14 @@ class Medium extends Data implements RenderableInterface
/**
* Helper method to determine if this media item has a thumbnail or not
*
* @param string $type;
*
* @return bool
*/
public function thumbnailExists()
public function thumbnailExists($type = 'page')
{
$thumbs = $this->get('thumbnails');
if (isset($thumbs['page'])) {
if (isset($thumbs[$type])) {
return true;
}
return false;