1<?php
2
3/*
4 * This file is part of the TYPO3 CMS project.
5 *
6 * It is free software; you can redistribute it and/or modify it under
7 * the terms of the GNU General Public License, either version 2
8 * of the License, or any later version.
9 *
10 * For the full copyright and license information, please read the
11 * LICENSE.txt file that was distributed with this source code.
12 *
13 * The TYPO3 project - inspiring people to share!
14 */
15
16namespace TYPO3\CMS\Core\DataHandling;
17
18use TYPO3\CMS\Core\Type\Enumeration;
19
20/**
21 * Enumeration object for tca type
22 */
23final class TableColumnType extends Enumeration
24{
25    const __default = self::INPUT;
26
27    /**
28     * Constants reflecting the table column type
29     */
30    const INPUT = 'INPUT';
31    const TEXT = 'TEXT';
32    const CHECK = 'CHECK';
33    const RADIO = 'RADIO';
34    const SELECT = 'SELECT';
35    const GROUP = 'GROUP';
36    const NONE = 'NONE';
37    const PASSTHROUGH = 'PASSTHROUGH';
38    const USER = 'USER';
39    const FLEX = 'FLEX';
40    const INLINE = 'INLINE';
41    const IMAGEMANIPULATION = 'IMAGEMANIPULATION';
42    const SLUG = 'SLUG';
43
44    /**
45     * @param mixed $type
46     */
47    public function __construct($type = null)
48    {
49        if ($type !== null) {
50            $type = strtoupper((string)$type);
51        }
52
53        parent::__construct($type);
54    }
55}
56