You are here

public static function TextimageImager::getImageUri in Textimage 7.3

Get a Textimage URI, building the image if necessary.

Parameters

name $style_name: the image style name.

array $effects_outline: an outline of the style's effects data.

array $text: text to be used to deliver the image.

string $extension: (optional) file extension to be delivered (png jpg jpeg gif). Defaults to 'png'.

bool $caching: (optional) TRUE if image caching has to be used. Defaults to TRUE.

object $node: (optional) a node entity. It is used for resolving the tokens in the text effects.

object $source_image_file: (optional) a file entity. It is used for resolving the tokens in the text effects.

string $target_uri: (optional) defines the URI where the Textimage image file should be saved. Disables caching.

Return value

array the URI of the image, or NULL in case of failure

1 call to TextimageImager::getImageUri()
TextimageTest::testTextimage in tests/textimage.test
Test functionality of the module.

File

classes/TextimageImager.inc, line 80
Textimage - Image processor class.

Class

TextimageImager
Textimage - Image processor class.

Code

public static function getImageUri($style_name, $effects_outline, $text, $extension = 'png', $caching = TRUE, $node = NULL, $source_image_file = NULL, $target_uri = NULL) {
  $data = array(
    'style_name' => $style_name,
    'effects' => $effects_outline,
    'text' => $text,
    'target_uri' => $target_uri,
    'extension' => $extension,
    'caching' => $caching,
    'node' => $node,
    'source_image_file' => $source_image_file,
  );
  return self::getTextimage($data)
    ->getUri();
}