Overview

Namespaces

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

Classes

  • Charcoal\Admin\Widget\Cms\HierarchicalSectionTableWidget
  • Charcoal\Admin\Widget\Cms\SectionTableWidget
  • Charcoal\Cms\AbstractDocument
  • Charcoal\Cms\AbstractEvent
  • Charcoal\Cms\AbstractFaq
  • Charcoal\Cms\AbstractImage
  • Charcoal\Cms\AbstractNews
  • Charcoal\Cms\AbstractSection
  • Charcoal\Cms\AbstractText
  • Charcoal\Cms\AbstractVideo
  • Charcoal\Cms\Config
  • Charcoal\Cms\Config\CmsConfig
  • Charcoal\Cms\Config\EventConfig
  • Charcoal\Cms\Config\NewsConfig
  • Charcoal\Cms\Config\SectionConfig
  • Charcoal\Cms\Document
  • Charcoal\Cms\DocumentCategory
  • Charcoal\Cms\EmptySection
  • Charcoal\Cms\Event
  • Charcoal\Cms\EventCategory
  • Charcoal\Cms\ExternalSection
  • Charcoal\Cms\Faq
  • Charcoal\Cms\FaqCategory
  • Charcoal\Cms\Image
  • Charcoal\Cms\ImageCategory
  • Charcoal\Cms\News
  • Charcoal\Cms\NewsCategory
  • Charcoal\Cms\Route\EventRoute
  • Charcoal\Cms\Route\GenericRoute
  • Charcoal\Cms\Route\NewsRoute
  • Charcoal\Cms\Route\SectionRoute
  • Charcoal\Cms\Section
  • Charcoal\Cms\Section\BlocksSection
  • Charcoal\Cms\Section\ContentSection
  • Charcoal\Cms\Service\Loader\AbstractLoader
  • Charcoal\Cms\Service\Loader\EventLoader
  • Charcoal\Cms\Service\Loader\NewsLoader
  • Charcoal\Cms\Service\Loader\SectionLoader
  • Charcoal\Cms\Service\Manager\AbstractManager
  • Charcoal\Cms\Service\Manager\EventManager
  • Charcoal\Cms\Service\Manager\NewsManager
  • Charcoal\Cms\ServiceProvider\CmsServiceProvider
  • Charcoal\Cms\Support\Helpers\DateHelper
  • Charcoal\Cms\Tag
  • Charcoal\Cms\Text
  • Charcoal\Cms\TextCategory
  • Charcoal\Cms\Video
  • Charcoal\Cms\VideoCategory
  • Charcoal\Property\TemplateOptionsProperty
  • Charcoal\Property\TemplateProperty

Interfaces

  • Charcoal\Cms\DocumentInterface
  • Charcoal\Cms\EventInterface
  • Charcoal\Cms\FaqInterface
  • Charcoal\Cms\ImageInterface
  • Charcoal\Cms\MetatagInterface
  • Charcoal\Cms\Mixin\HasContentBlocksInterface
  • Charcoal\Cms\NewsInterface
  • Charcoal\Cms\SearchableInterface
  • Charcoal\Cms\SectionInterface
  • Charcoal\Cms\Support\Interfaces\EventManagerAwareInterface
  • Charcoal\Cms\Support\Interfaces\NewsManagerAwareInterface
  • Charcoal\Cms\Support\Interfaces\SectionLoaderAwareInterface
  • Charcoal\Cms\TemplateableInterface
  • Charcoal\Cms\TextInterface
  • Charcoal\Cms\VideoInterface

Traits

  • Charcoal\Admin\Widget\Cms\SectionTableTrait
  • Charcoal\Cms\MetatagTrait
  • Charcoal\Cms\Mixin\Traits\HasContentBlocksTrait
  • Charcoal\Cms\SearchableTrait
  • Charcoal\Cms\Support\Traits\DateHelperAwareTrait
  • Charcoal\Cms\Support\Traits\EventManagerAwareTrait
  • Charcoal\Cms\Support\Traits\NewsManagerAwareTrait
  • Charcoal\Cms\Support\Traits\SectionLoaderAwareTrait
  • Charcoal\Cms\TemplateableTrait
  • Overview
  • Namespace
  • Class
  1: <?php
  2: 
  3: namespace Charcoal\Cms;
  4: 
  5: /**
  6:  * Default implementation, as Trait,
  7:  * of the {@see \Charcoal\Cms\TemplateableInterface}.
  8:  */
  9: trait TemplateableTrait
 10: {
 11:     /**
 12:      * The object's template identifier.
 13:      *
 14:      * @var mixed
 15:      */
 16:     private $templateIdent;
 17: 
 18:     /**
 19:      * The object's template controller identifier.
 20:      *
 21:      * @var mixed
 22:      */
 23:     private $controllerIdent;
 24: 
 25:     /**
 26:      * The customized template options.
 27:      *
 28:      * @var array
 29:      */
 30:     private $templateOptions = [];
 31: 
 32:     /**
 33:      * Set the renderable object's template identifier.
 34:      *
 35:      * @param  mixed $template The template ID.
 36:      * @return self
 37:      */
 38:     public function setTemplateIdent($template)
 39:     {
 40:         $this->templateIdent = $template;
 41: 
 42:         return $this;
 43:     }
 44: 
 45:     /**
 46:      * Retrieve the renderable object's template identifier.
 47:      *
 48:      * @return mixed
 49:      */
 50:     public function templateIdent()
 51:     {
 52:         return $this->templateIdent;
 53:     }
 54: 
 55:     /**
 56:      * Set the renderable object's template controller identifier.
 57:      *
 58:      * @param  mixed $ident The template controller identifier.
 59:      * @return self
 60:      */
 61:     public function setControllerIdent($ident)
 62:     {
 63:         $this->controllerIdent = $ident;
 64: 
 65:         return $this;
 66:     }
 67: 
 68:     /**
 69:      * Retrieve the renderable object's template controller identifier.
 70:      *
 71:      * @return mixed
 72:      */
 73:     public function controllerIdent()
 74:     {
 75:         return $this->controllerIdent;
 76:     }
 77: 
 78:     /**
 79:      * Customize the template's options.
 80:      *
 81:      * @param  mixed $options Template options.
 82:      * @return self
 83:      */
 84:     public function setTemplateOptions($options)
 85:     {
 86:         if (is_string($options)) {
 87:             $options = json_decode($options, true);
 88:         }
 89: 
 90:         $this->templateOptions = $options;
 91: 
 92:         return $this;
 93:     }
 94: 
 95:     /**
 96:      * Retrieve the template's customized options.
 97:      *
 98:      * @return array
 99:      */
100:     public function templateOptions()
101:     {
102:         return $this->templateOptions;
103:     }
104: }
105: 
API documentation generated by ApiGen