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 LANGUAGE = 'LANGUAGE';
38    const PASSTHROUGH = 'PASSTHROUGH';
39    const USER = 'USER';
40    const FLEX = 'FLEX';
41    const INLINE = 'INLINE';
42    const IMAGEMANIPULATION = 'IMAGEMANIPULATION';
43    const SLUG = 'SLUG';
44    const CATEGORY = 'CATEGORY';
45
46    /**
47     * @param mixed $type
48     */
49    public function __construct($type = null)
50    {
51        if ($type !== null) {
52            $type = strtoupper((string)$type);
53        }
54
55        parent::__construct($type);
56    }
57}
58