Метод |
Описание |
|
encodeEmailAddress ( $emailAddress ) |
* --------------------------------------------------------------------------------
Encode an email address as ordinal values to obfuscate it to bots
-------------------------------------------------------------------------------- |
|
extractKeywords ( $text = null, $limit = 15, $withoutStopWords = true ) |
* --------------------------------------------------------------------------------
Extract the most important words from the passed in text via TextRank
-------------------------------------------------------------------------------- |
|
extractSummary ( $text = null, $limit = null, $withoutStopWords = true ) |
* --------------------------------------------------------------------------------
Extract a summary from the text, or if it's not long enough, just return the text
-------------------------------------------------------------------------------- |
|
extractTextFromMatrix ( $matrixBlocks ) |
* --------------------------------------------------------------------------------
Extract all of the text and rich text from the fields in MatrixBlockModels
-------------------------------------------------------------------------------- |
|
getFilters ( ) |
* --------------------------------------------------------------------------------
Return our twig filters
-------------------------------------------------------------------------------- |
|
getFullyQualifiedUrl ( $url ) |
* --------------------------------------------------------------------------------
Get a fully qualified URL based on the siteUrl, if no scheme/host is present
-------------------------------------------------------------------------------- |
|
getFunctions ( ) |
* --------------------------------------------------------------------------------
Return our twig functions
-------------------------------------------------------------------------------- |
|
getGlobals ( ) |
* --------------------------------------------------------------------------------
Return our global variables
-------------------------------------------------------------------------------- |
|
getLocalizedUrls ( ) |
* --------------------------------------------------------------------------------
Returns an array of localized URLs for the current request
-------------------------------------------------------------------------------- |
|
getName ( ) |
* --------------------------------------------------------------------------------
The name of our Twig extension
-------------------------------------------------------------------------------- |
|
renderJSONLD ( $object = [] ) |
* --------------------------------------------------------------------------------
Render a generic JSON-LD object, passed in as an array() in the format: |
|
truncateStringOnWord ( $theString, $desiredLength ) |
* --------------------------------------------------------------------------------
Truncate the the string passed in, breaking it on a word. $desiredLength
is in characters; the returned string will be broken on a whole-word
boundary, with an … appended to the end if it is truncated
-------------------------------------------------------------------------------- |
|