PHP Class Pimcore\Tool\Text

Exibir arquivo Open project: pimcore/pimcore Class Usage Examples

Public Methods

Method Description
convertToUTF8 ( $text ) : string
detectEncoding ( $text ) : string
getCacheTagsOfWysiwygText ( $text, array $tags = [] ) : array
getDependenciesOfWysiwygText ( string $text ) : array extracts all dependencies to other elements from wysiwyg text
getElementsInWysiwyg ( $text ) : array
getElementsTagsInWysiwyg ( string $text ) : array
removeLineBreaks ( string $text = "" ) : mixed | string
replaceWysiwygTextRelationIds ( array $idMapping, string $text ) : mixed
wysiwygText ( $text ) : mixed

Method Details

convertToUTF8() public static method

public static convertToUTF8 ( $text ) : string
$text
return string

detectEncoding() public static method

public static detectEncoding ( $text ) : string
$text
return string

getCacheTagsOfWysiwygText() public static method

public static getCacheTagsOfWysiwygText ( $text, array $tags = [] ) : array
$text
$tags array
return array

getDependenciesOfWysiwygText() public static method

extracts all dependencies to other elements from wysiwyg text
public static getDependenciesOfWysiwygText ( string $text ) : array
$text string
return array

getElementsInWysiwyg() public static method

public static getElementsInWysiwyg ( $text ) : array
$text
return array

getElementsTagsInWysiwyg() public static method

public static getElementsTagsInWysiwyg ( string $text ) : array
$text string
return array

removeLineBreaks() public static method

public static removeLineBreaks ( string $text = "" ) : mixed | string
$text string
return mixed | string

replaceWysiwygTextRelationIds() public static method

Deprecation:
public static replaceWysiwygTextRelationIds ( array $idMapping, string $text ) : mixed
$idMapping array e.g. array("asset"=>array(OLD_ID=>NEW_ID),"object"=>array(OLD_ID=>NEW_ID),"document"=>array(OLD_ID=>NEW_ID));
$text string html text of wysiwyg field
return mixed

wysiwygText() public static method

public static wysiwygText ( $text ) : mixed
$text
return mixed