Documentation

ImportCMS
in package

Table of Contents

Properties

$old_widets  : mixed
$page_ids  : mixed
$revision_ids  : mixed

Methods

import()  : array<string|int, mixed>
Process given XML file into Sprout CMS 3 pages
findOldWidgets()  : void
Report pages that contain old widgets
processXmlPage()  : void
Process DOMElement into page record with content
replaceFileUrls()  : string
Replace file URLs FROM: files/1702_icon_joint.small.png TO: file/download/1702/small
replacePageIds()  : string
Replace page IDs within page URLS
updateContent()  : void
Update content for Sprout CMS 3

Properties

$old_widets

private static mixed $old_widets = []

$page_ids

private static mixed $page_ids = []

$revision_ids

private static mixed $revision_ids = []

Methods

import()

Process given XML file into Sprout CMS 3 pages

public static import(string $filename) : array<string|int, mixed>
Parameters
$filename : string

Path and filename of XML

Return values
array<string|int, mixed>

findOldWidgets()

Report pages that contain old widgets

private static findOldWidgets(mixed $rev_id, string $html) : void
Parameters
$rev_id : mixed
$html : string

HTML content

processXmlPage()

Process DOMElement into page record with content

private static processXmlPage(SimpleXMLElement $page, int $record_order, int $parent_id, int $subsite_id) : void
Parameters
$page : SimpleXMLElement
$record_order : int
$parent_id : int
$subsite_id : int

replaceFileUrls()

Replace file URLs FROM: files/1702_icon_joint.small.png TO: file/download/1702/small

private static replaceFileUrls(string $html) : string
Parameters
$html : string

HTML content

Return values
string —

HTML with replaced file URLs

replacePageIds()

Replace page IDs within page URLS

private static replacePageIds(string $html) : string
Parameters
$html : string

HTML content

Return values
string —

HTML with replaced URLs

updateContent()

Update content for Sprout CMS 3

private static updateContent() : void
On this page

Search results