Overview

Namespaces

  • DcGeneral
    • Clipboard
    • Contao
      • Callback
      • Compatibility
      • DataDefinition
        • Definition
      • Dca
        • Builder
          • Legacy
        • Definition
        • Palette
        • Populator
      • Event
      • View
        • Contao2BackendView
          • Event
    • Controller
    • Data
    • DataDefinition
      • Builder
      • Definition
        • Properties
        • View
          • Panel
      • ModelRelationship
      • Palette
        • Builder
          • Event
        • Condition
          • Palette
          • Property
    • EnvironmentPopulator
    • Event
    • Exception
    • Factory
      • Event
    • Panel
    • View
      • Event

Classes

  • DefaultProperty

Interfaces

  • PropertyInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  1: <?php
  2: /**
  3:  * PHP version 5
  4:  * @package    generalDriver
  5:  * @author     Christian Schiffler <c.schiffler@cyberspectrum.de>
  6:  * @author     Stefan Heimes <stefan_heimes@hotmail.com>
  7:  * @author     Tristan Lins <tristan.lins@bit3.de>
  8:  * @copyright  The MetaModels team.
  9:  * @license    LGPL.
 10:  * @filesource
 11:  */
 12: 
 13: namespace DcGeneral\DataDefinition\Definition\Properties;
 14: 
 15: /**
 16:  * Class DefaultProperty.
 17:  *
 18:  * Default implementation of a property definition.
 19:  *
 20:  * @package DcGeneral\DataDefinition\Definition\Properties
 21:  */
 22: class DefaultProperty implements PropertyInterface
 23: {
 24:     /**
 25:      * The property name.
 26:      *
 27:      * @var string
 28:      */
 29:     protected $name;
 30: 
 31:     /**
 32:      * The label of the property.
 33:      *
 34:      * @var string
 35:      */
 36:     protected $label;
 37: 
 38:     /**
 39:      * The description of the property.
 40:      *
 41:      * @var string
 42:      */
 43:     protected $description;
 44: 
 45:     /**
 46:      * The default value of the property.
 47:      *
 48:      * @var mixed
 49:      */
 50:     protected $defaultValue;
 51: 
 52:     /**
 53:      * Define if this property shall be excluded by default.
 54:      *
 55:      * @var bool
 56:      */
 57:     protected $excluded;
 58: 
 59:     /**
 60:      * Flag if this property shall be searchable.
 61:      *
 62:      * @var bool
 63:      */
 64:     protected $searchable;
 65: 
 66:     /**
 67:      * Flag if this property shall be sortable.
 68:      *
 69:      * @var bool
 70:      */
 71:     protected $sortable;
 72: 
 73:     /**
 74:      * Flag if this property shall be filterable.
 75:      *
 76:      * @var bool
 77:      */
 78:     protected $filterable;
 79: 
 80:     /**
 81:      * The grouping mode for this property.
 82:      *
 83:      * See ListingConfigInterface::GROUP_* flags.
 84:      *
 85:      * @var string
 86:      */
 87:     protected $groupingMode;
 88: 
 89:     /**
 90:      * The grouing length of this property. See grouping mode.
 91:      *
 92:      * @var string
 93:      */
 94:     protected $groupingLength;
 95: 
 96:     /**
 97:      * The sorting mode for this property.
 98:      *
 99:      * See ListingConfigInterface::SORT_* flags.
100:      *
101:      * @var string
102:      */
103:     protected $sortingMode;
104: 
105:     /**
106:      * The input widget type to use.
107:      *
108:      * @var string
109:      */
110:     protected $widgetType;
111: 
112:     /**
113:      * The value options for this property.
114:      *
115:      * @var array|null
116:      */
117:     protected $options;
118: 
119:     /**
120:      * The explanation string for this property.
121:      *
122:      * @var string
123:      */
124:     protected $explanation;
125: 
126:     /**
127:      * The extra information for this property.
128:      *
129:      * @var array
130:      */
131:     protected $extra;
132: 
133:     /**
134:      * Create an instance.
135:      *
136:      * @param string $name The name of the property.
137:      */
138:     public function __construct($name)
139:     {
140:         $this->name = $name;
141:     }
142: 
143:     /**
144:      * {@inheritdoc}
145:      */
146:     public function getName()
147:     {
148:         return $this->name;
149:     }
150: 
151:     /**
152:      * {@inheritdoc}
153:      */
154:     public function setLabel($value)
155:     {
156:         $this->label = $value;
157: 
158:         return $this;
159:     }
160: 
161:     /**
162:      * {@inheritdoc}
163:      */
164:     public function getLabel()
165:     {
166:         return $this->label;
167:     }
168: 
169:     /**
170:      * {@inheritdoc}
171:      */
172:     public function setDescription($value)
173:     {
174:         $this->description = $value;
175: 
176:         return $this;
177:     }
178: 
179:     /**
180:      * {@inheritdoc}
181:      */
182:     public function getDescription()
183:     {
184:         return $this->description;
185:     }
186: 
187:     /**
188:      * {@inheritdoc}
189:      */
190:     public function setDefaultValue($value)
191:     {
192:         $this->defaultValue = $value;
193: 
194:         return $this;
195:     }
196: 
197:     /**
198:      * {@inheritdoc}
199:      */
200:     public function getDefaultValue()
201:     {
202:         return $this->defaultValue;
203:     }
204: 
205:     /**
206:      * {@inheritdoc}
207:      */
208:     public function setExcluded($value)
209:     {
210:         $this->excluded = $value;
211: 
212:         return $this;
213:     }
214: 
215:     /**
216:      * {@inheritdoc}
217:      */
218:     public function isExcluded()
219:     {
220:         return $this->excluded;
221:     }
222: 
223:     /**
224:      * {@inheritdoc}
225:      */
226:     public function setSearchable($value)
227:     {
228:         $this->searchable = $value;
229: 
230:         return $this;
231:     }
232: 
233:     /**
234:      * {@inheritdoc}
235:      */
236:     public function isSearchable()
237:     {
238:         return $this->searchable;
239:     }
240: 
241:     /**
242:      * {@inheritdoc}
243:      */
244:     public function setSortable($value)
245:     {
246:         $this->sortable = $value;
247: 
248:         return $this;
249:     }
250: 
251:     /**
252:      * {@inheritdoc}
253:      */
254:     public function isSortable()
255:     {
256:         return $this->sortable;
257:     }
258: 
259:     /**
260:      * {@inheritdoc}
261:      */
262:     public function setFilterable($value)
263:     {
264:         $this->filterable = $value;
265: 
266:         return $this;
267:     }
268: 
269:     /**
270:      * {@inheritdoc}
271:      */
272:     public function isFilterable()
273:     {
274:         return $this->filterable;
275:     }
276: 
277:     /**
278:      * {@inheritdoc}
279:      */
280:     public function setGroupingMode($value)
281:     {
282:         $this->groupingMode = $value;
283: 
284:         return $this;
285:     }
286: 
287:     /**
288:      * {@inheritdoc}
289:      */
290:     public function getGroupingMode()
291:     {
292:         return $this->groupingMode;
293:     }
294: 
295:     /**
296:      * {@inheritdoc}
297:      */
298:     public function setGroupingLength($value)
299:     {
300:         $this->groupingLength = $value;
301: 
302:         return $this;
303:     }
304: 
305:     /**
306:      * {@inheritdoc}
307:      */
308:     public function getGroupingLength()
309:     {
310:         return $this->groupingLength;
311:     }
312: 
313:     /**
314:      * {@inheritdoc}
315:      */
316:     public function setSortingMode($value)
317:     {
318:         $this->sortingMode = $value;
319: 
320:         return $this;
321:     }
322: 
323:     /**
324:      * {@inheritdoc}
325:      */
326:     public function getSortingMode()
327:     {
328:         return $this->sortingMode;
329:     }
330: 
331:     /**
332:      * {@inheritdoc}
333:      */
334:     public function setWidgetType($value)
335:     {
336:         $this->widgetType = $value;
337: 
338:         return $this;
339:     }
340: 
341:     /**
342:      * {@inheritdoc}
343:      */
344:     public function getWidgetType()
345:     {
346:         return $this->widgetType;
347:     }
348: 
349:     /**
350:      * {@inheritdoc}
351:      */
352:     public function setOptions($value)
353:     {
354:         $this->options = $value;
355: 
356:         return $this;
357:     }
358: 
359:     /**
360:      * {@inheritdoc}
361:      */
362:     public function getOptions()
363:     {
364:         return $this->options;
365:     }
366: 
367:     /**
368:      * {@inheritdoc}
369:      */
370:     public function setExplanation($value)
371:     {
372:         $this->explanation = $value;
373: 
374:         return $this;
375:     }
376: 
377:     /**
378:      * {@inheritdoc}
379:      */
380:     public function getExplanation()
381:     {
382:         return $this->explanation;
383:     }
384: 
385:     /**
386:      * {@inheritdoc}
387:      */
388:     public function setExtra($value)
389:     {
390:         $this->extra = $value;
391: 
392:         return $this;
393:     }
394: 
395:     /**
396:      * {@inheritdoc}
397:      */
398:     public function getExtra()
399:     {
400:         return $this->extra;
401:     }
402: }
403: 
contao-community-alliance/dc-general API documentation generated by ApiGen 2.8.0