Overview

Namespaces

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

Traits

  • HasContentBlocksTrait
  • Overview
  • Namespace
  • Class

Trait HasContentBlocksTrait

An implementation, as Trait, of the HasContentBlocksInterface.

Namespace: Charcoal\Cms\Mixin\Traits
Uses: Charcoal\Attachment\Traits\AttachmentAwareTrait
Located at Charcoal/Cms/Mixin/Traits/HasContentBlocksTrait.php
Methods summary
public Collection|Attachment[]
# contentBlocks( )

Retrieve this object's content blocks.

Retrieve this object's content blocks.

Returns

Collection|Attachment[]
public boolean
# hasContentBlocks( )

Determine if this object has any content blocks.

Determine if this object has any content blocks.

Returns

boolean
public integer
# numContentBlocks( )

Count the number of content blocks associated to this object.

Count the number of content blocks associated to this object.

Returns

integer
public Charcoal\Translator\Translation
# defaultMetaDescription( )

Returns

Charcoal\Translator\Translation
abstract public Collection|Attachment[]
# attachments( string|null $group = null, string|null $type = null, callable $callback = null )

Retrieve the objects associated to the current object.

Retrieve the objects associated to the current object.

As defined in Charcoal\Attachment\Traits\AttachmentAwareTrait.

Parameters

$group
Filter the attachments by a group identifier.
$type
Filter the attachments by type.
$callback
Optional routine to apply to every attachment.

Returns

Collection|Attachment[]

Throws

InvalidArgumentException
If the $group or $type is invalid.
API documentation generated by ApiGen