class ContentImporter (View source)

Constants

IMPORT_MODE_INSTALL

IMPORT_MODE_UPGRADE

Properties

static protected $mcBlockIDs
static protected $ptComposerOutputControlIDs
protected $home
protected $importMode

Methods

__construct(string $importMode = self::IMPORT_MODE_UPGRADE)

No description

void
setImportMode(string $importMode)

No description

importContentFile($file)

No description

setHomePage($c)

No description

importContentString($string)

No description

importXml(SimpleXMLElement $xml)

No description

import(SimpleXMLElement $element)

No description

static 
static 
addMasterCollectionBlockID($b, $id)

No description

static 
static 
importFiles($fromPath, $computeThumbnails = true)

No description

moveFilesByName(array $fileNames, $folder)

Moves files with a particular filename to a particular folder.

deleteFilesByName(array $fileNames)

Deletes files with a particular filename.

Details

__construct(string $importMode = self::IMPORT_MODE_UPGRADE)

No description

Parameters

string $importMode
  • a constant mapping to self::IMPORT_MODE_INSTALL or self::IMPORT_MODE_UPGRADE If upgrade is specified, any routines will work off existing database schema if applicable (note: not all CIF elements always support upgrade context.). If INSTALL is specified, we use empty database schemas for improved performance. For backward compatibility, UPGRADE is the default.

void setImportMode(string $importMode)

No description

Parameters

string $importMode

Return Value

void

importContentFile($file)

No description

Parameters

$file

setHomePage($c)

No description

Parameters

$c

importContentString($string)

No description

Parameters

$string

importXml(SimpleXMLElement $xml)

No description

Parameters

SimpleXMLElement $xml

protected import(SimpleXMLElement $element)

No description

Parameters

SimpleXMLElement $element

static getMasterCollectionTemporaryBlockIDs()

No description

static addMasterCollectionBlockID($b, $id)

No description

Parameters

$b
$id

static getMasterCollectionTemporaryBlockID($b)

No description

Parameters

$b

static addPageTypeComposerOutputControlID(FormLayoutSetControl $control, $id)

No description

Parameters

FormLayoutSetControl $control
$id

static getPageTypeComposerFormLayoutSetControlFromTemporaryID($id)

No description

Parameters

$id

importFiles($fromPath, $computeThumbnails = true)

No description

Parameters

$fromPath
$computeThumbnails

moveFilesByName(array $fileNames, $folder)

Moves files with a particular filename to a particular folder.

Parameters

array $fileNames
$folder

deleteFilesByName(array $fileNames)

Deletes files with a particular filename.

Note: only use this in highly controlled environments, as in resetting sample content.

Parameters

array $fileNames