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: