‪TYPO3CMS  11.5
TYPO3\CMS\Core\Database\SoftReferenceIndex Class Reference
Inheritance diagram for TYPO3\CMS\Core\Database\SoftReferenceIndex:
TYPO3\CMS\Core\DataHandling\SoftReference\TypolinkSoftReferenceParser TYPO3\CMS\Core\SingletonInterface TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserInterface

Public Member Functions

 __construct (EventDispatcherInterface $eventDispatcher, SoftReferenceParserFactory $softReferenceParserFactory)
 
 findRef ($table, $field, $uid, $content, $spKey, $spParams, $structurePath='')
 
 parse (string $table, string $field, int $uid, string $content, string $structurePath='')
 
 setParserKey (string $parserKey, array $parameters)
 
array null findRef_typolink ($content, $spParams)
 
array null findRef_typolink_tag ($content)
 
array null findRef_email ($content, $spParams)
 
array null findRef_url ($content, $spParams)
 
array null findRef_extension_fileref ($content)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser
string makeTokenID (string $index='')
 
 getParserKey ()
 
 findRef (string $table, string $field, int $uid, string $content, string $spKey, array $spParams, string $structurePath='')
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Compatibility\PublicMethodDeprecationTrait
mixed __call (string $methodName, array $arguments)
 

Public Attributes

string $tokenID_basePrefix
 

Protected Attributes

SoftReferenceParserFactory $softReferenceParserFactory
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser
string $tokenID_basePrefix = ''
 
string $parserKey = ''
 
array $parameters = []
 

Additional Inherited Members

- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser
 setTokenIdBasePrefix (string $table, string $uid, string $field, string $structurePath)
 

Detailed Description

Class for processing of the default soft reference types for CMS:

  • ‪'substitute' : A full field value targeted for manual substitution (for import /export features)
  • ‪'notify' : Just report if a value is found, nothing more.
  • ‪'typolink' : references to page id or file, possibly with anchor/target, possibly commaseparated list.
  • ‪'typolink_tag' : As typolink, but searching for <link> tag to encapsulate it.
  • ‪'email' : Email highlight
  • ‪'url' : URL highlights (with a scheme)
    Deprecated:
    ‪will be removed in TYPO3 v12.0 in favor of SoftReferenceParserInterface

Definition at line 35 of file SoftReferenceIndex.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Database\SoftReferenceIndex::__construct ( EventDispatcherInterface  $eventDispatcher,
SoftReferenceParserFactory  $softReferenceParserFactory 
)

Member Function Documentation

◆ findRef()

TYPO3\CMS\Core\Database\SoftReferenceIndex::findRef (   $table,
  $field,
  $uid,
  $content,
  $spKey,
  $spParams,
  $structurePath = '' 
)

◆ findRef_email()

array null TYPO3\CMS\Core\Database\SoftReferenceIndex::findRef_email (   $content,
  $spParams 
)

Finding email addresses in content and making them substitutable.

Parameters
string$content‪The input content to analyze
array$spParams‪Parameters set for the softref parser key in TCA/columns
Returns
‪array|null Result array on positive matches, see description above. Otherwise null

Definition at line 116 of file SoftReferenceIndex.php.

◆ findRef_extension_fileref()

array null TYPO3\CMS\Core\Database\SoftReferenceIndex::findRef_extension_fileref (   $content)

Finding reference to files from extensions in content, but only to notify about their existence. No substitution

Parameters
string$content‪The input content to analyze
Returns
‪array|null Result array on positive matches, see description above. Otherwise null

Definition at line 143 of file SoftReferenceIndex.php.

◆ findRef_typolink()

array null TYPO3\CMS\Core\Database\SoftReferenceIndex::findRef_typolink (   $content,
  $spParams 
)

TypoLink value processing. Will process input value as a TypoLink value.

Parameters
string$content‪The input content to analyze
array$spParams‪Parameters set for the softref parser key in TCA/columns. value "linkList" will split the string by comma before processing.
Returns
‪array|null Result array on positive matches, see description above. Otherwise null
See also
‪\TYPO3\CMS\Frontend\ContentObject::typolink()
getTypoLinkParts()

Definition at line 86 of file SoftReferenceIndex.php.

◆ findRef_typolink_tag()

array null TYPO3\CMS\Core\Database\SoftReferenceIndex::findRef_typolink_tag (   $content)

TypoLink tag processing. Will search for <link ...> and tags in the content string and process any found.

Parameters
string$content‪The input content to analyze
Returns
‪array|null Result array on positive matches, see description above. Otherwise null
See also
‪\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::typolink()
getTypoLinkParts()

Definition at line 102 of file SoftReferenceIndex.php.

◆ findRef_url()

array null TYPO3\CMS\Core\Database\SoftReferenceIndex::findRef_url (   $content,
  $spParams 
)

Finding URLs in content

Parameters
string$content‪The input content to analyze
array$spParams‪Parameters set for the softref parser key in TCA/columns
Returns
‪array|null Result array on positive matches, see description above. Otherwise null

Definition at line 130 of file SoftReferenceIndex.php.

◆ parse()

TYPO3\CMS\Core\Database\SoftReferenceIndex::parse ( string  $table,
string  $field,
int  $uid,
string  $content,
string  $structurePath = '' 
)

Main function through which can parse content for a specific field.

Parameters
string$tableDatabase table name
string$field‪Field name for which processing occurs
int$uid‪UID of the record
string$content‪The content/value of the field
string$structurePath‪If running from inside a FlexForm structure, this is the path of the tag.
Returns
‪SoftReferenceParserResult Result object on positive matches, see description above.
See also
‪SoftReferenceParserResult

Reimplemented from TYPO3\CMS\Core\DataHandling\SoftReference\TypolinkSoftReferenceParser.

Definition at line 65 of file SoftReferenceIndex.php.

References TYPO3\CMS\Core\DataHandling\SoftReference\SoftReferenceParserResult\createWithoutMatches().

◆ setParserKey()

TYPO3\CMS\Core\Database\SoftReferenceIndex::setParserKey ( string  $parserKey,
array  $parameters 
)
Parameters
string$parserKey‪The softref parser key.
array$parameters‪Parameters of the softlink parser. Basically this is the content inside optional []-brackets after the softref keys. Parameters are exploded by ";

Reimplemented from TYPO3\CMS\Core\DataHandling\SoftReference\AbstractSoftReferenceParser.

Definition at line 71 of file SoftReferenceIndex.php.

Member Data Documentation

◆ $softReferenceParserFactory

SoftReferenceParserFactory TYPO3\CMS\Core\Database\SoftReferenceIndex::$softReferenceParserFactory
protected

◆ $tokenID_basePrefix

string TYPO3\CMS\Core\Database\SoftReferenceIndex::$tokenID_basePrefix

Definition at line 37 of file SoftReferenceIndex.php.