Overview

Namespaces

  • Charcoal
    • Admin
      • Widget
        • Cms
    • Cms
      • Config
      • Mixin
        • Traits
      • Route
      • Section
      • Service
        • Loader
        • Manager
      • ServiceProvider
      • Support
        • Helpers
        • Interfaces
        • Traits
    • Property

Classes

  • AbstractDocument
  • AbstractEvent
  • AbstractFaq
  • AbstractImage
  • AbstractNews
  • AbstractSection
  • AbstractText
  • AbstractVideo
  • Config
  • Document
  • DocumentCategory
  • EmptySection
  • Event
  • EventCategory
  • ExternalSection
  • Faq
  • FaqCategory
  • Image
  • ImageCategory
  • News
  • NewsCategory
  • Section
  • Tag
  • Text
  • TextCategory
  • Video
  • VideoCategory

Interfaces

  • DocumentInterface
  • EventInterface
  • FaqInterface
  • ImageInterface
  • MetatagInterface
  • NewsInterface
  • SearchableInterface
  • SectionInterface
  • TemplateableInterface
  • TextInterface
  • VideoInterface

Traits

  • MetatagTrait
  • SearchableTrait
  • TemplateableTrait
  • Overview
  • Namespace
  • Class

Class AbstractSection

A Section is a unique, reachable page.

Types of sections

There can be different types of section. 4 exists in the CMS module: - blocks - content - empty - external

External implementations

Sections implement the following Interface / Trait: - From the Charcoal\Object namespace (in charcoal-base) - Hierarchical - Routable - From the local Charcoal\Cms namespace - Metatag - Searchable

Charcoal\Object\Content
Extended by Charcoal\Cms\AbstractSection implements Charcoal\Object\HierarchicalInterface, Charcoal\Cms\MetatagInterface, Charcoal\Object\RoutableInterface, Charcoal\Cms\SearchableInterface, Charcoal\Cms\SectionInterface, Charcoal\Cms\TemplateableInterface uses Charcoal\Object\HierarchicalTrait (not available) Charcoal\Cms\MetatagTrait, Charcoal\Object\RoutableTrait (not available) Charcoal\Cms\SearchableTrait, Charcoal\Cms\TemplateableTrait

Direct known subclasses

Charcoal\Cms\EmptySection, Charcoal\Cms\ExternalSection, Charcoal\Cms\Section, Charcoal\Cms\Section\BlocksSection, Charcoal\Cms\Section\ContentSection
Abstract
Namespace: Charcoal\Cms
Located at Charcoal/Cms/AbstractSection.php
Methods summary
public
# __construct( array $data = null )

Section constructor.

Section constructor.

Parameters

$data
Init data.
public boolean
# isDeletable( )

Determine if the object can be deleted.

Determine if the object can be deleted.

Returns

boolean
public string
# hierarchicalLabel( )

Retrieve the object's title.

Retrieve the object's title.

Returns

string
public ArrayAccess|Traversable
# loadChildren( )

HierarchicalTrait > loadChildren

HierarchicalTrait > loadChildren

Returns

ArrayAccess|Traversable
public Charcoal\Cms\AbstractSection
# setSectionType( string $type )

Set the section's type.

Set the section's type.

Parameters

$type
The section type.

Returns

Charcoal\Cms\AbstractSection

Throws

InvalidArgumentException
If the section type is not a string or not a valid section type.

Implementation of

Charcoal\Cms\SectionInterface::setSectionType()
public Charcoal\Cms\AbstractSection
# setInMenu( string|string[] $menu )

Set the menus this object belongs to.

Set the menus this object belongs to.

Parameters

$menu
One or more menu identifiers.

Returns

Charcoal\Cms\AbstractSection

Implementation of

Charcoal\Cms\SectionInterface::setInMenu()
public Charcoal\Cms\AbstractSection
# setKeywords( string|string[] $keywords )

Set the object's keywords.

Set the object's keywords.

Parameters

$keywords
One or more entries.

Returns

Charcoal\Cms\AbstractSection

Implementation of

Charcoal\Cms\SectionInterface::setKeywords()
public Charcoal\Cms\AbstractSection
# setSummary( Charcoal\Translator\Translation|string|null $summary )

Parameters

$summary
The summary.

Returns

Charcoal\Cms\AbstractSection

Implementation of

Charcoal\Cms\SectionInterface::setSummary()
public Charcoal\Cms\AbstractSection
# setExternalUrl( Charcoal\Translator\Translation|string|null $externalUrl )

Parameters

$externalUrl
The external url.

Returns

Charcoal\Cms\AbstractSection

Implementation of

Charcoal\Cms\SectionInterface::setExternalUrl()
public Charcoal\Cms\AbstractSection
# setLocked( boolean $locked )

Section is locked when you can't change the URL

Section is locked when you can't change the URL

Parameters

$locked
Prevent new route creation about that object.

Returns

Charcoal\Cms\AbstractSection

Implementation of

Charcoal\Cms\SectionInterface::setLocked()
public Charcoal\Cms\AbstractSection
# setTitle( Charcoal\Translator\Translation|string|null $title )

Parameters

$title
The section title (localized).

Returns

Charcoal\Cms\AbstractSection

Implementation of

Charcoal\Cms\SectionInterface::setTitle()
public Charcoal\Cms\AbstractSection
# setSubtitle( Charcoal\Translator\Translation|string|null $subtitle )

Parameters

$subtitle
The section subtitle (localized).

Returns

Charcoal\Cms\AbstractSection

Implementation of

Charcoal\Cms\SectionInterface::setSubtitle()
public Charcoal\Cms\AbstractSection
# setContent( Charcoal\Translator\Translation|string|null $content )

Parameters

$content
The section content (localized).

Returns

Charcoal\Cms\AbstractSection

Implementation of

Charcoal\Cms\SectionInterface::setContent()
public Charcoal\Cms\AbstractSection
# setImage( mixed $image )

Parameters

$image
The section main image (localized).

Returns

Charcoal\Cms\AbstractSection

Implementation of

Charcoal\Cms\SectionInterface::setImage()
public string
# sectionType( )

Retrieve the section's type.

Retrieve the section's type.

Returns

string

Implementation of

Charcoal\Cms\SectionInterface::sectionType()
public Charcoal\Translator\Translation|string|null
# title( )

Returns

Charcoal\Translator\Translation|string|null

Implementation of

Charcoal\Cms\SectionInterface::title()
public Charcoal\Translator\Translation|string|null
# subtitle( )

Returns

Charcoal\Translator\Translation|string|null

Implementation of

Charcoal\Cms\SectionInterface::subtitle()
public Charcoal\Translator\Translation|string|null
# content( )

Returns

Charcoal\Translator\Translation|string|null

Implementation of

Charcoal\Cms\SectionInterface::content()
public Charcoal\Translator\Translation|string|null
# image( )

Returns

Charcoal\Translator\Translation|string|null

Implementation of

Charcoal\Cms\SectionInterface::image()
public Charcoal\Translator\Translation|string|null
# inMenu( )

Retrieve the menus this object belongs to.

Retrieve the menus this object belongs to.

Returns

Charcoal\Translator\Translation|string|null

Implementation of

Charcoal\Cms\SectionInterface::inMenu()
public string[]
# keywords( )

Retrieve the object's keywords.

Retrieve the object's keywords.

Returns

string[]

Implementation of

Charcoal\Cms\SectionInterface::keywords()
public Charcoal\Translator\Translation|string|null
# summary( )

HierarchicalTrait > loadChildren

HierarchicalTrait > loadChildren

Returns

Charcoal\Translator\Translation|string|null

Implementation of

Charcoal\Cms\SectionInterface::summary()
public Charcoal\Translator\Translation|string|null
# externalUrl( )

Returns

Charcoal\Translator\Translation|string|null

Implementation of

Charcoal\Cms\SectionInterface::externalUrl()
public boolean
# locked( )

Returns

boolean
Or Null.

Implementation of

Charcoal\Cms\SectionInterface::locked()
public string
# canonicalUrl( )

MetatagTrait > canonicalUrl

MetatagTrait > canonicalUrl

Returns

string

Implementation of

Charcoal\Cms\MetatagInterface::canonicalUrl()
public Charcoal\Translator\Translation|string|null
# defaultMetaTitle( )

Returns

Charcoal\Translator\Translation|string|null

Implementation of

Charcoal\Cms\MetatagInterface::defaultMetaTitle()
public Charcoal\Translator\Translation|string|null
# defaultMetaDescription( )

Returns

Charcoal\Translator\Translation|string|null

Implementation of

Charcoal\Cms\MetatagInterface::defaultMetaDescription()
public Charcoal\Translator\Translation|string|null
# defaultMetaImage( )

Returns

Charcoal\Translator\Translation|string|null

Implementation of

Charcoal\Cms\MetatagInterface::defaultMetaImage()
public array
# parseAsMultiple( mixed $value, string|PropertyInterface $separator = ',' )

Parse the property value as a "multiple" value type.

Parse the property value as a "multiple" value type.

Parameters

$value
The value being converted to an array.
$separator
The boundary string.

Returns

array
public boolean
# postSave( )

Route generated on postSave in case it contains the ID of the section, which you only get once you have save

Route generated on postSave in case it contains the ID of the section, which you only get once you have save

Returns

boolean
public boolean
# postUpdate( array $properties = null )

Check whatever before the update.

Check whatever before the update.

Parameters

$properties
Properties.

Returns

boolean
public boolean
# preSave( )

Returns

boolean
public boolean
# preUpdate( array $properties = null )

Parameters

$properties
Optional properties to update.

Returns

boolean
public boolean
# preDelete( )

Event called before deleting the object.

Event called before deleting the object.

Returns

boolean

See

\Charcoal\Model\AbstractModel::preDelete() For the "delete" Event.
Methods inherited from Charcoal\Cms\MetatagInterface
facebookAppId(), metaAuthor(), metaDescription(), metaImage(), metaTags(), metaTitle(), opengraphAuthor(), opengraphDescription(), opengraphImage(), opengraphPublisher(), opengraphSiteName(), opengraphTags(), opengraphTitle(), opengraphType(), setFacebookAppId(), setMetaAuthor(), setMetaDescription(), setMetaImage(), setMetaTitle(), setOpengraphAuthor(), setOpengraphDescription(), setOpengraphImage(), setOpengraphPulisher(), setOpengraphSiteName(), setOpengraphTitle(), setOpengraphType()
Methods inherited from Charcoal\Cms\SearchableInterface
searchKeywords(), searchProperties(), setSearchKeywords(), setSearchProperties()
Methods inherited from Charcoal\Cms\TemplateableInterface
controllerIdent(), setControllerIdent(), setTemplateIdent(), setTemplateOptions(), templateIdent(), templateOptions()
Methods used from Charcoal\Cms\MetatagTrait
facebookAppId(), generateDefaultMetaTags(), isEmptyMeta(), metaAuthor(), metaDescription(), metaImage(), metaTags(), metaTitle(), opengraphAuthor(), opengraphDescription(), opengraphImage(), opengraphPublisher(), opengraphSiteName(), opengraphTags(), opengraphTitle(), opengraphType(), setFacebookAppId(), setMetaAuthor(), setMetaDescription(), setMetaImage(), setMetaTitle(), setOpengraphAuthor(), setOpengraphDescription(), setOpengraphImage(), setOpengraphPulisher(), setOpengraphSiteName(), setOpengraphTitle(), setOpengraphType(), translator()
Methods used from Charcoal\Cms\SearchableTrait
searchKeywords(), searchProperties(), setSearchKeywords(), setSearchProperties()
Methods used from Charcoal\Cms\TemplateableTrait
controllerIdent(), setControllerIdent(), setTemplateIdent(), setTemplateOptions(), templateIdent(), templateOptions()
Constants summary
string TYPE_BLOCKS
# 'charcoal/cms/section/blocks-section'
string TYPE_CONTENT
# 'charcoal/cms/section/content-section'
string TYPE_EMPTY
# 'charcoal/cms/section/empty-section'
string TYPE_EXTERNAL
# 'charcoal/cms/section/external-section'
string DEFAULT_TYPE
# Charcoal\Cms\AbstractSection::TYPE_CONTENT
Properties summary
protected string[] $inMenu

The menus this object is shown in.

The menus this object is shown in.

#
protected array $keywords
#
protected Charcoal\Translator\Translation|string $summary

$summary

$summary

#
protected string $externalUrl

$externalUrl

$externalUrl

#
protected boolean $locked

$locked

$locked

#
Properties used from Charcoal\Cms\MetatagTrait
$facebookAppId, $metaAuthor, $metaDescription, $metaImage, $metaTitle, $opengraphAuthor, $opengraphDescription, $opengraphImage, $opengraphPublisher, $opengraphSiteName, $opengraphTitle, $opengraphType
API documentation generated by ApiGen