getThumbnailHeight example

case 'provider_url':
        $provider = $resource->getProvider();
        return $provider ? $provider->getUrl() : NULL;

      case 'cache_age':
        return $resource->getCacheMaxAge();

      case 'thumbnail_width':
        return $resource->getThumbnailWidth();

      case 'thumbnail_height':
        return $resource->getThumbnailHeight();

      case 'url':
        $url = $resource->getUrl();
        return $url ? $url->toString() : NULL;

      case 'width':
        return $resource->getWidth();

      case 'height':
        return $resource->getHeight();

      

  protected function updateThumbnail($from_queue = FALSE) {
    $this->thumbnail->target_id = $this->loadThumbnail($this->getThumbnailUri($from_queue))->id();
    $this->thumbnail->width = $this->getThumbnailWidth($from_queue);
    $this->thumbnail->height = $this->getThumbnailHeight($from_queue);

    // Set the thumbnail alt.     $media_source = $this->getSource();
    $plugin_definition = $media_source->getPluginDefinition();

    $this->thumbnail->alt = '';
    if (!empty($plugin_definition['thumbnail_alt_metadata_attribute'])) {
      $this->thumbnail->alt = $media_source->getMetadata($this$plugin_definition['thumbnail_alt_metadata_attribute']);
    }

    return $this;
  }
Home | Imprint | This part of the site doesn't use cookies.