1: <?php
2: namespace Charcoal\Cms\Config;
3:
4: // dependencies from `charcoal-config`
5: use Charcoal\Config\AbstractConfig;
6:
7: /**
8: * Section Config
9: */
10: class SectionConfig extends AbstractConfig
11: {
12: /**
13: * @var mixed
14: */
15: private $baseSection;
16:
17: /**
18: * Different section type available
19: * They should be extending the baseSection
20: * @var mixed
21: */
22: private $sectionTypes;
23:
24: /**
25: * @var string
26: */
27: private $objType;
28:
29: /**
30: * Base section ID.
31: * Used in section loader to retrieve sections
32: * relative to this specific section. (usually: home)
33: * @param mixed $baseSection Base section ID.
34: * @return SectionConfig
35: */
36: public function setBaseSection($baseSection)
37: {
38: $this->baseSection = $baseSection;
39:
40: return $this;
41: }
42:
43: /**
44: * Set the available section types
45: * @param mixed $sectionTypes Section types.
46: */
47: public function setSectionTypes($sectionTypes)
48: {
49: $this->sectionTypes = $sectionTypes;
50: return $this;
51: }
52:
53: /**
54: * @param string $objType Section object type.
55: * @return SectionConfig
56: */
57: public function setObjType($objType)
58: {
59: $this->objType = $objType;
60:
61: return $this;
62: }
63:
64: /**
65: * @return mixed ID to base section.
66: */
67: public function baseSection()
68: {
69: return $this->baseSection;
70: }
71:
72: /**
73: * Available section types.
74: * @return mixed Section types. Could be null.
75: */
76: public function sectionTypes()
77: {
78: return $this->sectionTypes;
79: }
80:
81: /**
82: * @return string Section object type.
83: */
84: public function objType()
85: {
86: return $this->objType;
87: }
88: }
89: