39 public function findRef($table, $field,
$uid, $content, $spKey, $spParams, $structurePath =
'') {
41 $this->tokenID_basePrefix = $table .
':' .
$uid .
':' . $field .
':' . $structurePath .
':' . $spKey;
43 case 'rtehtmlarea_images':
65 $imgTags = $htmlParser->splitTags(
'img', $content);
68 foreach ($imgTags as $k => $v) {
71 $attribs = $htmlParser->get_tag_attributes($v);
72 $fileUid = $attribs[0][
'data-htmlarea-file-uid'];
73 $fileTable = $attribs[0][
'data-htmlarea-file-table'];
78 $elements[$k] = array();
79 $elements[$k][
'matchString'] = $v;
81 $imgTags[$k] = str_replace(
'data-htmlarea-file-uid="' . $fileUid .
'"',
'data-htmlarea-file-uid="{softref:' . $tokenID .
'}"', $imgTags[$k]);
82 $elements[$k][
'subst'] = array(
84 'recordRef' => ($fileTable ?:
'sys_file') .
':' . $fileUid,
85 'tokenID' => $tokenID,
86 'tokenValue' => $fileUid
92 if (count($elements)) {
94 'content' => implode(
'', $imgTags),
95 'elements' => $elements
static makeInstance($className)
findRef_rtehtmlarea_images($content, $spParams)
findRef($table, $field, $uid, $content, $spKey, $spParams, $structurePath='')