public static function TextimageImager::getTextimage in Textimage 7.3
Get a Textimage, building the image if necessary.
2 calls to TextimageImager::getTextimage()
- TextimageImager::processImageRequest in classes/
TextimageImager.inc - Process image delivery request.
- theme_textimage_formatter in ./
textimage.module - Theme function to format a Textimage.
File
- classes/
TextimageImager.inc, line 140 - Textimage - Image processor class.
Class
- TextimageImager
- Textimage - Image processor class.
Code
public static function getTextimage($data = array()) {
$data += array(
'style' => NULL,
'user_messages' => TRUE,
'force_hashed_filename' => FALSE,
);
$textimage = new Textimage();
if ($data['style']) {
$textimage
->style($data['style']);
}
elseif ($data['style_name']) {
$textimage
->styleByName($data['style_name']);
}
else {
$textimage
->effects(!empty($data['effects']) ? $data['effects'] : array());
}
if ($data['source_image_file']) {
$textimage
->sourceImageFile($data['source_image_file']);
}
if ($data['node']) {
$textimage
->node($data['node']);
}
if ($data['target_uri']) {
$textimage
->setTargetUri($data['target_uri']);
}
else {
$textimage
->setCaching($data['caching']);
}
if (isset($data['user_messages'])) {
$textimage
->setUserMessages($data['user_messages']);
}
if ($data['force_hashed_filename']) {
$textimage
->setHashedFilename(TRUE);
}
return $textimage
->extension($data['extension'])
->process($data['text']);
}