You are here

public static function TextimageImager::getTextFieldText in Textimage 7.3

Retrieves text from a Text field.

Text gets sanitized for use within Textimage: HTML tags are stripped.

Parameters

array $items: Field items.

array $field: The field where items are contained.

array $instance: The field instance.

object $node: The node where the items are contained.

Return value

array An array of sanitized text items.

2 calls to TextimageImager::getTextFieldText()
TextimageImager::processTokens in classes/TextimageImager.inc
Textimage tokens replacement.
textimage_field_formatter_view in ./textimage.module
Implements hook_field_formatter_view().

File

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

Class

TextimageImager
Textimage - Image processor class.

Code

public static function getTextFieldText($items, $field, $instance, $node) {
  $text = array();
  if (!empty($items)) {
    foreach ($items as $item) {
      $text[] = strip_tags($item['value']);
    }
  }
  return $text;
}