‘Flatten’ the array of data for an element into the text to use.
The array looks like:
array('text' => 'The text', 'html'=>0);
Where the html key is a boolean for whether the element text uses HTML.
If no Element Flatten filters operate, the value of the text key is used.
This filter’s name is actually an array of strings. The first string must always be ‘Flatten’, but the last three can change depending on exactly what values you want to filter.
array('Flatten', $recordType, $elementSetName, $elementName)
array post_array
The posted data, like array('text' => 'The text', 'html'=>0);
Element element
The element being saved.
$_filters = array('prependJulianToDate' => array('Flatten', 'Item', 'Dublin Core', 'Date'));
public function prependJulianToDate($flatText, $args)
{
$postArray = $args['post_array'];
$value = $postArray['text'];
return "Julian Calendar: $value";
}
ElementText::getTextStringFromFormPost