You are here

public static function TextimageImager::processImageRequest in Textimage 7.3

Process image delivery request.

Parameters

array $style: the image style

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

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

string $extension: file extension to be delivered (png jpg jpeg gif)

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::processImageRequest()
textimage_url_deliver in ./textimage.module
Deliver directly a Textimage from the URL request.

File

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

Class

TextimageImager
Textimage - Image processor class.

Code

public static function processImageRequest($style, $effects_outline, &$text, $extension, $caching = TRUE, $node = NULL, $source_image_file = NULL, $target_uri = NULL) {
  $data = array(
    'style' => $style,
    'effects' => $effects_outline,
    'text' => $text,
    'target_uri' => $target_uri,
    'extension' => $extension,
    'caching' => $caching,
    'node' => $node,
    'source_image_file' => $source_image_file,
    'user_messages' => FALSE,
  );
  $textimage = self::getTextimage($data);
  $text = $textimage
    ->getText();
  return $textimage
    ->getUri();
}