class Type extends Object implements ObjectInterface, AssignableObjectInterface (View source)

Traits

Properties

$error from Object
protected $ptDefaultPageTemplateID

Methods

loadError($error)

No description

from Object
isError()

No description

from Object
getError()

No description

from Object
setPropertiesFromArray($arr)

No description

from Object
static 
camelcase($file)

No description

from Object
static 
uncamelcase($string)

No description

from Object
assignPermissions($userOrGroup, $permissions = [], $accessType = Key::ACCESS_TYPE_INCLUDE, $cascadeToChildren = true)

No description

getPageTypeID()

No description

getPageTypeName()

No description

getSiteTypeID()

No description

getSiteTypeObject()

No description

getPageTypeDisplayName($format = 'html')

No description

getPageTypeHandle()

No description

isPageTypeFrequentlyAdded()

No description

getPageTypeDisplayOrder()

No description

setPermissionsToOverride()

No description

isPageTypeInternal()

No description

doesPageTypeLaunchInComposer()

No description

getPackageID()

No description

getPackageHandle()

No description

publish(Page $c, $requestOrDateTime = null)

No description

savePageTypeComposerForm(Page $c) deprecated

No description

static 
getByDefaultsPage(Page $c)

No description

getPageTypePageTemplateDefaultPageObject(Template $template = null)

No description

static 
importTargets($node)

No description

static 
import($node)

No description

static 
importContent($node)

No description

export($nxml)

No description

static 
exportList($xml)

No description

getPageTypeUsageCount()

No description

duplicate($ptHandle, $ptName, $siteType = null)

No description

static Type|mixed|null
add(array $data, bool|Package $pkg = false)

Add a page type.

update($data)

No description

static 
getList($includeInternal = false, $siteType = null)

No description

static 
returnList($ptIDs)

No description

static 
getFrequentlyUsedList($siteType = null)

No description

static 
getInfrequentlyUsedList($siteType = null)

No description

static 
getListByPackage($pkg)

No description

static 
getListByDefaultPageTemplate($templateOrTemplateID)

No description

static 
getByID($ptID)

No description

static 
getByHandle($ptHandle)

No description

delete()

No description

setConfiguredPageTypePublishTargetObject(Configuration $configuredTarget)

No description

addPageTypeComposerFormLayoutSet($ptComposerFormLayoutSetName, $ptComposerFormLayoutSetDescription)

No description

canPublishPageTypeBeneathPage(Page $page)

Returns true if pages of the current type are allowed beneath the passed parent page.

getPageTypeSaverObject()

No description

createDraft(Template $pt, $u = false)

No description

renderComposerOutputForm($page = null, $targetPage = null)

No description

Details

loadError($error)

Parameters

$error

isError()

getError()

setPropertiesFromArray($arr)

Parameters

$arr

static camelcase($file)

Parameters

$file

static uncamelcase($string)

Parameters

$string

assignPermissions($userOrGroup, $permissions = [], $accessType = Key::ACCESS_TYPE_INCLUDE, $cascadeToChildren = true)

Parameters

$userOrGroup
$permissions
$accessType
$cascadeToChildren

getPageTypeID()

getPageTypeName()

getSiteTypeID()

getSiteTypeObject()

getPageTypeDisplayName($format = 'html')

Parameters

$format

getPageTypeHandle()

getPageTypePublishTargetTypeID()

getPageTypePublishTargetObject()

getPageTypeAllowedPageTemplates()

getPageTypeDefaultPageTemplateID()

getPageTypeDefaultPageTemplateObject()

getPermissionObjectIdentifier()

isPageTypeFrequentlyAdded()

getPageTypeDisplayOrder()

getPermissionResponseClassName()

getPermissionAssignmentClassName()

getPermissionObjectKeyCategoryHandle()

setChildPermissionsToOverride()

setPermissionsToOverride()

isPageTypeInternal()

doesPageTypeLaunchInComposer()

getPackageID()

getPackageHandle()

protected stripEmptyPageTypeComposerControls(Page $c)

Parameters

Page $c

publish(Page $c, $requestOrDateTime = null)

Parameters

Page $c
$requestOrDateTime

savePageTypeComposerForm(Page $c) deprecated

deprecated

Parameters

Page $c

getPageTypeSelectedPageTemplateObjects()

static getByDefaultsPage(Page $c)

Parameters

Page $c

getPageTypePageTemplateDefaultPageObject(Template $template = null)

Parameters

Template $template

getPageTypePageTemplateObjects()

static importTargets($node)

Parameters

$node

static import($node)

Parameters

$node

static importContent($node)

Parameters

$node

export($nxml)

Parameters

$nxml

static exportList($xml)

Parameters

$xml

rescanPageTypeComposerOutputControlObjects()

getPageTypeUsageCount()

duplicate($ptHandle, $ptName, $siteType = null)

Parameters

$ptHandle
$ptName
$siteType

static Type|mixed|null add(array $data, bool|Package $pkg = false)

Add a page type.

Parameters

array $data {

@var string          $handle              A string which can be used to identify the page type
@var string          $name                A user friendly display name
@var \PageTemplate   $defaultTemplate     The default template object or handle
@var string          $allowedTemplates    (A|C|X) A for all, C for selected only, X for non-selected only
@var \PageTemplate[] $templates           Array or Iterator of selected templates, see `$allowedTemplates`, or Page Template Handles
@var bool            $internal            Is this an internal only page type? Default: `false`
@var bool            $ptLaunchInComposer  Does this launch in composer? Default: `false`
@var bool            $ptIsFrequentlyAdded Should this always be displayed in the pages panel? Default: `false`

}

bool|Package $pkg This should be false if the type is not tied to a package, or a package object

Return Value

Type|mixed|null

update($data)

Parameters

$data

protected rescanPageTypePageTemplateDefaultPages()

static getList($includeInternal = false, $siteType = null)

Parameters

$includeInternal
$siteType

static protected returnList($ptIDs)

Parameters

$ptIDs

static getFrequentlyUsedList($siteType = null)

Parameters

$siteType

static getInfrequentlyUsedList($siteType = null)

Parameters

$siteType

static getListByPackage($pkg)

Parameters

$pkg

static getListByDefaultPageTemplate($templateOrTemplateID)

Parameters

$templateOrTemplateID

static getByID($ptID)

Parameters

$ptID

static getByHandle($ptHandle)

Parameters

$ptHandle

delete()

setConfiguredPageTypePublishTargetObject(Configuration $configuredTarget)

Parameters

Configuration $configuredTarget

rescanFormLayoutSetDisplayOrder()

addPageTypeComposerFormLayoutSet($ptComposerFormLayoutSetName, $ptComposerFormLayoutSetDescription)

Parameters

$ptComposerFormLayoutSetName
$ptComposerFormLayoutSetDescription

canPublishPageTypeBeneathPage(Page $page)

Returns true if pages of the current type are allowed beneath the passed parent page.

Parameters

Page $page

ValidatorInterface|null getPageTypeValidatorObject()

Return Value

ValidatorInterface|null

SaverInterface|null getPageTypeSaverObject()

Return Value

SaverInterface|null

createDraft(Template $pt, $u = false)

Parameters

Template $pt
$u

renderComposerOutputForm($page = null, $targetPage = null)

Parameters

$page
$targetPage