public function addImage ($image, $size, $width=0, $height=0)
	{
		if (!is_array($image))
		{
			return;
		}
		
		if (@unserialize($size) === false)
		{
			$size = serialize(array((string)$width, (string)$height, $size));
		}
		
		$image['size'] = $size;
		$image['singleSRC'] = $image['path'];
		
		Pattern::addImageToTemplate($picture = new \stdClass(), $image);	
		
		$picture = $picture->picture;
		$picture['imageUrl'] = $image['imageUrl'];
		$picture['caption'] = $image['caption'];
		$picture['id'] = $image['id'];
		$picture['uuid'] = $image['uuid'];
		$picture['name'] = $image['name'];
		$picture['path'] = $image['path'];
		$picture['extension'] = $image['extension'];

		return $picture;
	}
public function addImage ($image, $size, $width=0, $height=0)
	{
		if (!is_array($image))
		{
			return;
		}
		
		if (@unserialize($size) === false)
		{
			$size = serialize(array((string)$width, (string)$height, $size));
		}
		
		$image['size'] = $size;
		$image['singleSRC'] = $image['path'];
		
		Pattern::addImageToTemplate($picture = new \stdClass(), $image);	
		
		$picture = $picture->picture;
		$picture['imageUrl'] = $image['imageUrl'];
		$picture['caption'] = $image['caption'];
		$picture['id'] = $image['id'];
		$picture['uuid'] = $image['uuid'];
		$picture['name'] = $image['name'];
		$picture['path'] = $image['path'];
		$picture['extension'] = $image['extension'];

		return $picture;
	}
public function addImage ( $ image , $ size , $ width = 0 , $ height = 0 ) { if ( ! is_array ( $ image ) ) { return ; } if ( @ unserialize ( $ size ) === false ) { $ size = serialize ( array ( ( string ) $ width , ( string ) $ height , $ size ) ) ; } $ image [ 'size' ] = $ size ; $ image [ 'singleSRC' ] = $ image [ 'path' ] ; Pattern :: addImageToTemplate ( $ picture = new \ stdClass ( ) , $ image ) ; $ picture = $ picture -> picture ; $ picture [ 'imageUrl' ] = $ image [ 'imageUrl' ] ; $ picture [ 'caption' ] = $ image [ 'caption' ] ; $ picture [ 'id' ] = $ image [ 'id' ] ; $ picture [ 'uuid' ] = $ image [ 'uuid' ] ; $ picture [ 'name' ] = $ image [ 'name' ] ; $ picture [ 'path' ] = $ image [ 'path' ] ; $ picture [ 'extension' ] = $ image [ 'extension' ] ; return $ picture ; }
Add an image to template

@param array      $image  The image parameter array from the FileTree pattern
@param string|int $size   The image size from the ImageSize widget as serialized array or imagesize id
@param integer    $width  An optional width of the image
@param integer    $height An optional height of the image

@return array The new (resized) image parameter array
Add an image to template