Get post thumbnail in correct size
@param  [type] $item [description]
@return [type]       [description]
432234
public function getThumbnail($item)
    {
        if ($item['image_display'] == 'custom' || $item['link_type'] == 'external') {
            return wp_get_attachment_image_src(
                $item['custom_image']['ID'],
                apply_filters(
                    'Modularity/index/image',
                    municipio_to_aspect_ratio('16:9', $this->thumbnailSize),
                    $this->args
                )
            );
        } elseif ($item['image_display'] == 'false') {
            return false;
        }

        return wp_get_attachment_image_src(
            get_post_thumbnail_id($item['page']->ID),
            apply_filters(
                'Modularity/index/image',
                municipio_to_aspect_ratio('16:9', $this->thumbnailSize),
                $this->args
            )
        );
    }
925980
protected function convertItemToHash(Item $item)
    {
        $hash = array();

        foreach ($item->getState() as $propName => $propValue) {
            switch ($propName) {
                case 'blockId':
                case 'contentId':
                case 'locationId':
                case 'priority':
                case 'movedTo':
                case 'action':
                    if ($propValue !== null) {
                        $hash[$propName] = $propValue;
                    }
                    break;
                case 'attributes':
                    if ($propValue !== null && $propValue !== array()) {
                        $hash['attributes'] = $propValue;
                    }
                    break;
                case 'publicationDate':
                case 'visibilityDate':
                case 'hiddenDate':
                case 'rotationUntilDate':
                    if ($propValue !== null) {
                        /* @var $propValue \DateTime */
                        $hash[$propName] = $propValue->format(\DateTime::RFC850);
                    }
                    break;
            }
        }

        return $hash;
    }
798437
protected function setImage(Item $item)
    {
        if ($item->hasImage() && !$this->overrideImage) {
            return $item;
        }

        $this->setImageFromContent($item);

        return $item;
    }
497940
public function get_thumbnail($key = 0)
	{
		$thumbnails = $this->get_thumbnails();
		if (isset($thumbnails[$key]))
		{
			return $thumbnails[$key];
		}

		return null;
	}
966024
public function itemCreate(Item $item)
    {
        $response = $this->getGuzzleClient()
            ->post(
                '/items',
                array_merge($this->setQuery(), $this->setBody($item))
            );

        return $this->serializer->deserialize(
            $response->getBody()->getContents(),
            Item::class,
            'json'
        );
    }
476837
public function __item($item = null)
    {
        $result = parent::__item($item);
        $result['content'] = true;
        return $result;
    }
1167831
protected function getCover(ItemEntity $item)
    {
        $from = $this->root.$item->getDownloadPath().'/'.$item->getCover();
        if (!$this->fs->exists($from)) {
            return '';
        }

        // copy cover
        $target = $item->getPath().'/';
        $filename = self::COVER_FILENAME.'.'.pathinfo($item->getCover(), PATHINFO_EXTENSION);
        if (is_file($item->getPath())) {
            $target = dirname($item->getPath()).'/';
            $filename = pathinfo($item->getPath(), PATHINFO_FILENAME).'-'.$filename;
        }
        $this->fs->copy($from, $target.$filename);
        return $filename;
    }
267711
public function thumbnail($size = 'full')
    {
        $thumb = wp_get_attachment_image_src(get_post_thumbnail_id($this->id()), $size);
        return isset($thumb[0]) ? $thumb[0] : '';
    }
697523
public function getUrlManagerConfig($item)
    {
        $urlManager = $this->getConfigByName('urlManager');
        if (isset($urlManager[$item])) {
            return $urlManager[$item];
        }
        return false;
    }
295047
protected function createMediaEntity( $item ) {
		$m = new \Pressbooks\Entities\Cloner\Media();

		$m->id = $item['post_id'];
		$m->title = $item['post_title'];
		$m->description = $item['post_content'];
		$m->caption = $item['post_excerpt'];

		if ( isset( $item['postmeta'] ) && is_array( $item['postmeta'] ) ) {
			foreach ( $item['postmeta'] as $meta ) {
				if ( str_starts_with( $meta['key'], '_' ) === false ) {
					$m->meta[ $meta['key'] ] = $meta['value'];
				}
				if ( $meta['key'] === '_wp_attachment_image_alt' ) {
					$m->altText = $meta['value'];
				}
			}
		}

		$m->sourceUrl = $item['attachment_url'];

		return $m;
	}
57190
public function getRowUrl($item)
    {
        if (!$item instanceof Varien_Object) {
            return parent::getRowUrl($item);
        }

        $rowUrlRoute = trim($this->getRowUrlRoute());
        if (empty($rowUrlRoute)) {
            return parent::getRowUrl($item);
        }

        $params = [];

        $rowUrlParams = $this->getRowUrlParams();
        $rowUrlParams = (is_array($rowUrlParams) ? $rowUrlParams : explode(',', $rowUrlParams));
        $rowUrlParams = array_filter(array_map('trim', $rowUrlParams));
        foreach ($rowUrlParams as $key => $value) {
            if (strpos($value, '{{') === 0 && strrpos($value, '}}') === (strlen($value) - 2)) {
                $value = $item->getDataUsingMethod(substr($value, 2, -2));
            }

            $params[$key] = $value;
        }

        $rowUrlQueryParams = $this->getRowUrlQueryParams();
        $rowUrlQueryParams = (is_array($rowUrlQueryParams) ? $rowUrlQueryParams : explode(',', $rowUrlQueryParams));
        $rowUrlQueryParams = array_filter(array_map('trim', $rowUrlQueryParams));
        foreach ($rowUrlQueryParams as $key => $value) {
            if (strpos($value, '{{') === 0 && strrpos($value, '}}') === (strlen($value) - 2)) {
                $value = $item->getDataUsingMethod(substr($value, 1, -1));
            }
            $params['_query'][$key] = $value;
        }

        return $this->getUrl($rowUrlRoute, $params);
    }
325896
public function __item($item = null)
    {
        $result['name'] = $this->getName();
        $result['content'] = '0';
        $result['active'] = is_null($item) ? true : $item['active'];
        $result['settings'] = Eresus_CMS::getLegacyKernel()->db->
            escape(is_null($item) ? encodeOptions($this->settings) : $item['settings']);
        $result['title'] = $this->title;
        $result['version'] = $this->version;
        $result['description'] = $this->description;
        return $result;
    }
660606
protected function getValue( $item )
    {
        if ( is_bool( $item ) )
            $value = $item ? "true" : "false";
        else if ( is_array( $item ) )
            $value = 'Array(' . count( $item ) . ')';
        else if ( is_numeric( $item ) )
            $value = $item;
        else if ( is_string( $item ) )
            $value = "'" . $item . "'";
        else if ( is_object( $item ) )
            $value = method_exists( $item, '__toString' ) ? (string)$item : 'Object';
        else
            $value = $item;

        return $value;
    }
1078635
protected function getFeeLine($item)
    {
        $feeEx = $item['line_total'];
        $feeVat = $item['line_tax'];

        $result = array(
                Tag::Product => $this->t($item['name']),
                Tag::UnitPrice => $feeEx,
                Meta::PrecisionUnitPrice => 0.01,
                Tag::Quantity => 1,
            ) + $this->getVatRangeTags($feeVat, $feeEx);

        return $result;
    }
723979
public function getEditUrlFor($item)
    {
        $params = array('id' => $item['id']);
        $params = array_merge($params, $this->getExtraParameters());

        return array(
            'path' => $this->getPathByConvention($this::SUFFIX_EDIT),
            'params' => $params,
        );
    }
274700
public function get_thumbnail()
	{
		if (!isset($this->data['thumbnail']))
		{
			if ($return = $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'thumbnail'))
			{
				$this->data['thumbnail'] = $return[0]['attribs'][''];
			}
			else
			{
				$this->data['thumbnail'] = null;
			}
		}
		return $this->data['thumbnail'];
	}
122199
protected function getItemAttributes(ItemInterface $item)
    {
        $result = $item->getAttributes();

        $result['id'] = $item->getId();
        $result['content'] = $item->getContent();
        $result['collection'] = $item->getCollection();
        $result['path'] = $item->getPath(ItemInterface::SNAPSHOT_PATH_RELATIVE);

        return $result;
    }