original_string: public function getImage($type, $size, array $attributes = array())
  	{
  		if (empty($this->$type))
  		{
  			return null;
  		}
  		$html = '<img src="' . $this->getImageSrc($type, $size) . '"';
  		$html .= ' alt="' . $this->{$type.'_alt'} . '"';
  		$html .= ' width="' . $this->getImageWidth($type, $size) . '"';
  		$html .= ' height="' . $this->getImageHeight($type, $size) . '"';
  		
  		$html_attributes = '';
  		if (!empty($attributes)) {
  			$html_attributes = join(' ', array_map(function($key) use ($attributes) {
  				if(is_bool($attributes[$key]))
  				{
  					return $attributes[$key] ? $key : '';
  				}
  				return "{$key}=\"{$attributes[$key]}\"";
  			}, array_keys($attributes)));
  		}
  		
  		return $html;
  	}
code: public function getImage($type, $size, array $attributes = array())
  	{
  		if (empty($this->$type))
  		{
  			return null;
  		}
  		$html = '<img src="' . $this->getImageSrc($type, $size) . '"';
  		$html .= ' alt="' . $this->{$type.'_alt'} . '"';
  		$html .= ' width="' . $this->getImageWidth($type, $size) . '"';
  		$html .= ' height="' . $this->getImageHeight($type, $size) . '"';
  		
  		$html_attributes = '';
  		if (!empty($attributes)) {
  			$html_attributes = join(' ', array_map(function($key) use ($attributes) {
  				if(is_bool($attributes[$key]))
  				{
  					return $attributes[$key] ? $key : '';
  				}
  				return "{$key}=\"{$attributes[$key]}\"";
  			}, array_keys($attributes)));
  		}
  		
  		return $html;
  	}
code_tokens: public function getImage ( $ type , $ size , array $ attributes = array ( ) ) { if ( empty ( $ this -> $ type ) ) { return null ; } $ html = '<img src="' . $ this -> getImageSrc ( $ type , $ size ) . '"' ; $ html .= ' alt="' . $ this -> { $ type . '_alt' } . '"' ; $ html .= ' width="' . $ this -> getImageWidth ( $ type , $ size ) . '"' ; $ html .= ' height="' . $ this -> getImageHeight ( $ type , $ size ) . '"' ; $ html_attributes = '' ; if ( ! empty ( $ attributes ) ) { $ html_attributes = join ( ' ' , array_map ( function ( $ key ) use ( $ attributes ) { if ( is_bool ( $ attributes [ $ key ] ) ) { return $ attributes [ $ key ] ? $ key : '' ; } return "{$key}=\"{$attributes[$key]}\"" ; } , array_keys ( $ attributes ) ) ) ; } return $ html ; }
docstring: Returns the HTML img tag for the requested image type and size for this item
  
  @param $type
  @param $size
  @return null|string
docstring_tokens: Returns the HTML img tag for the requested image type and size for this item