SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class ContentReplace

No description yet.

Variables

NameVisibilityDescription
$preloaded_widgets (static) 
$temp (static) 

Functions

NameVisibilityDescription
_emailWidgetsprivate (static) 
_emptyTablesprivate (static) 
_intlinksprivate (static) 
dbFieldspublic (static)Replace database fields with database values
documentLinkspublic (static)Use Sprout::specialFileLinks instead, it's got better unit tests etc.
emailWidgetspublic (static)Replace embed code with the actual widget. This is a tweaked version of embedWidgets, designed for email
embedWidgetpublic (static)Embeds a widget into some text
embedWidgetspublic (static)Replace embed code with the actual widgets.
emptyTablespublic (static)Remove tables that don't contain any content
executeChainpublic (static)Execute a content replace chain
expandolinkpublic (static)Replaces an expando with a link to the specified URL
fileDownloadpublic (static)Replace file URLs that refer to IDs with URLs which refer to filenames
htmlpublic (static)Do all the replacements normally required for HTML content
intlinkspublic (static)Replace links to internal pages in the format page/view_by_id/... with the page's friendly url
localAnchorpublic (static)Replace anchors without a URL (e.g. href="#top") to include the page URL to fix issues with BASE HREF
lookupWidgetspublic (static) 
preloadWidgetspublic (static)Add some preloaded widgets, e.g. generated by a preview
removeWidgetspublic (static)Remove widget embed code from the specified HTML

private _emailWidgets

unknown ContentReplace::_emailWidgets ( mixed $matches );

This function does not have a description

private _emptyTables

unknown ContentReplace::_emptyTables ( mixed $matches );

This function does not have a description

private _intlinks

unknown ContentReplace::_intlinks ( mixed $matches );

This function does not have a description

public dbFields

unknown ContentReplace::dbFields ( mixed $text , string $data );

Replace database fields with database values

Replacement code is in the format ((REPLACE field_name))

public documentLinks

unknown ContentReplace::documentLinks ( mixed $html );

Use Sprout::specialFileLinks instead, it's got better unit tests etc.

public emailWidgets

unknown ContentReplace::emailWidgets ( mixed $text , string $widget_table , string $widget_record , mixed $pre_html , mixed $post_html );

Replace embed code with the actual widget. This is a tweaked version of embedWidgets, designed for email

Embed code is in the format ((WIDGET code))

public embedWidget

string ContentReplace::embedWidget ( string $text , string $pattern , array $widget );

Embeds a widget into some text

public embedWidgets

string ContentReplace::embedWidgets ( string $text , string $widget_table , int $widget_record );

Replace embed code with the actual widgets.

Embed code is in the format ((WIDGET code))

public emptyTables

unknown ContentReplace::emptyTables ( mixed $text );

Remove tables that don't contain any content

public executeChain

unknown ContentReplace::executeChain ( string $chain , string $html );

Execute a content replace chain

public expandolink

unknown ContentReplace::expandolink ( string $html [, string $url ] );

Replaces an expando with a link to the specified URL

This method might not preserve whitespace in the input html.
The link is only appended if the content actually contained expandos.
The lunk url is optional. If not provided, no link gets appended.

public fileDownload

string ContentReplace::fileDownload ( string $html );

Replace file URLs that refer to IDs with URLs which refer to filenames

public html

string ContentReplace::html ( string $html );

Do all the replacements normally required for HTML content
Internal links, inline addons, the local anchor fix, etc.

public intlinks

unknown ContentReplace::intlinks ( mixed $text );

Replace links to internal pages in the format page/view_by_id/... with the page's friendly url

public localAnchor

unknown ContentReplace::localAnchor ( mixed $text );

Replace anchors without a URL (e.g. href="#top") to include the page URL to fix issues with BASE HREF

public lookupWidgets

array ContentReplace::lookupWidgets ( string $widget_table , int $widget_record , array $embed_keys );

This function does not have a description

public preloadWidgets

void ContentReplace::preloadWidgets ( array $widgets , array $settings );

Add some preloaded widgets, e.g. generated by a preview

public removeWidgets

unknown ContentReplace::removeWidgets ( mixed $text );

Remove widget embed code from the specified HTML
Embed code is in the format ((WIDGET code))