Newscoop\Image\ArticleRenditionCollection::offsetExists PHP Method

offsetExists() public method

Test if can provide image for rendition
public offsetExists ( Newscoop\Image\Rendition $rendition, boolean $strict = false ) : boolean
$rendition Newscoop\Image\Rendition
$strict boolean Check only key existing
return boolean
    public function offsetExists($rendition, $strict = false)
    {
        if ($strict) {
            return array_key_exists((string) $rendition, $this->renditions);
        }
        return array_key_exists((string) $rendition, $this->renditions) || $this->defaultImage !== null && $rendition->fits($this->defaultImage);
    }