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: namespace Charcoal\Cms\Config;
  3: 
  4: // dependencies from `charcoal-config`
  5: use Charcoal\Config\AbstractConfig;
  6: 
  7: /**
  8:  * Event Config
  9:  */
 10: class EventConfig extends AbstractConfig
 11: {
 12:     /**
 13:      * @var integer
 14:      */
 15:     private $numPerPage;
 16: 
 17:     /**
 18:      * @var string
 19:      */
 20:     private $entryCycle;
 21: 
 22:     /**
 23:      * @var string
 24:      */
 25:     private $lifespan;
 26: 
 27:     /**
 28:      * @var string
 29:      */
 30:     private $objType;
 31: 
 32:     /**
 33:      * @var string
 34:      */
 35:     private $category;
 36: 
 37:     /**
 38:      * @var string
 39:      */
 40:     private $configFeatIdent;
 41: 
 42:     /**
 43:      * @var array
 44:      */
 45:     private $thumbnail;
 46: 
 47:     /**
 48:      * l10n
 49:      * @var string
 50:      */
 51:     private $parentSectionSlug;
 52: 
 53:     /**
 54:      * @return integer Number of items per page.
 55:      */
 56:     public function numPerPage()
 57:     {
 58:         return $this->numPerPage;
 59:     }
 60: 
 61:     /**
 62:      * @return boolean Entry cycle.
 63:      */
 64:     public function entryCycle()
 65:     {
 66:         return $this->entryCycle;
 67:     }
 68: 
 69:     /**
 70:      * Valid DateTime string
 71:      * @return string Event expiry.
 72:      */
 73:     public function lifespan()
 74:     {
 75:         return $this->lifespan;
 76:     }
 77: 
 78:     /**
 79:      * @return string Event Object type.
 80:      */
 81:     public function objType()
 82:     {
 83:         return $this->objType;
 84:     }
 85: 
 86:     /**
 87:      * @return string Category object.
 88:      */
 89:     public function category()
 90:     {
 91:         return $this->category;
 92:     }
 93: 
 94:     /**
 95:      * @return string Config property.
 96:      */
 97:     public function configFeatIdent()
 98:     {
 99:         return $this->configFeatIdent;
100:     }
101: 
102:     /**
103:      * @return array Thumbnail generation values.
104:      */
105:     public function thumbnail()
106:     {
107:         return $this->thumbnail;
108:     }
109: 
110:     /**
111:      * @return string Event parent section slug.
112:      */
113:     public function parentSectionSlug()
114:     {
115:         return $this->parentSectionSlug;
116:     }
117: 
118:     /**
119:      * @param integer $numPerPage Number of event per page.
120:      * @return EventConfig
121:      */
122:     public function setNumPerPage($numPerPage)
123:     {
124:         $this->numPerPage = $numPerPage;
125: 
126:         return $this;
127:     }
128: 
129:     /**
130:      * @param boolean $entryCycle Cycle event or not.
131:      * @return EventConfig
132:      */
133:     public function setEntryCycle($entryCycle)
134:     {
135:         $this->entryCycle = $entryCycle;
136: 
137:         return $this;
138:     }
139: 
140:     /**
141:      * Accept all DateTime string.
142:      * @param string $lifespan Event expiry.
143:      * @return EventConfig
144:      */
145:     public function setLifespan($lifespan)
146:     {
147:         $this->lifespan = $lifespan;
148: 
149:         return $this;
150:     }
151: 
152:     /**
153:      * @param string $objType Event object type.
154:      * @return EventConfig
155:      */
156:     public function setObjType($objType)
157:     {
158:         $this->objType = $objType;
159: 
160:         return $this;
161:     }
162: 
163:     /**
164:      * @param string $category Event category object.
165:      * @return EventConfig
166:      */
167:     public function setCategory($category)
168:     {
169:         $this->category = $category;
170: 
171:         return $this;
172:     }
173: 
174:     /**
175:      * Might be overkill.
176:      * @param string $configFeatIdent Config property containing featured event.
177:      * @return EventConfig
178:      */
179:     public function setConfigFeatIdent($configFeatIdent)
180:     {
181:         $this->configFeatIdent = $configFeatIdent;
182: 
183:         return $this;
184:     }
185: 
186:     /**
187:      * resize -> width.
188:      * @param array $thumbnail Event thumbnail size.
189:      * @return EventConfig
190:      */
191:     public function setThumbnail(array $thumbnail)
192:     {
193:         $this->thumbnail = $thumbnail;
194: 
195:         return $this;
196:     }
197: 
198:     /**
199:      * @param string $parentSectionSlug Event parent section (slug).
200:      * @return EventConfig
201:      */
202:     public function setParentSectionSlug($parentSectionSlug)
203:     {
204:         $this->parentSectionSlug = $this->translator()->translation($parentSectionSlug);
205: 
206:         return $this;
207:     }
208: }
209: 
API documentation generated by ApiGen