TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Core\Type\Enumeration Class Reference
Inheritance diagram for TYPO3\CMS\Core\Type\Enumeration:
TYPO3\CMS\Core\Type\TypeInterface TYPO3\CMS\Backend\Toolbar\Enumeration\InformationStatus TYPO3\CMS\Core\DataHandling\TableColumnSubType TYPO3\CMS\Core\DataHandling\TableColumnType TYPO3\CMS\Core\Resource\DuplicationBehavior TYPO3\CMS\Core\Tests\Unit\Type\Fixture\Enumeration\CompleteEnumeration TYPO3\CMS\Core\Tests\Unit\Type\Fixture\Enumeration\DuplicateConstantValueEnumeration TYPO3\CMS\Core\Tests\Unit\Type\Fixture\Enumeration\InvalidConstantEnumeration TYPO3\CMS\Core\Tests\Unit\Type\Fixture\Enumeration\MissingConstantsEnumeration TYPO3\CMS\Core\Tests\Unit\Type\Fixture\Enumeration\MissingDefaultEnumeration TYPO3\CMS\Core\Type\Bitmask\JsConfirmation TYPO3\CMS\Core\Type\Bitmask\Permission TYPO3\CMS\Core\Type\Icon\IconState TYPO3\CMS\Core\Versioning\VersionState TYPO3\CMS\IndexedSearch\Utility\LikeWildcard

Public Member Functions

 __construct ($value=null)
 
 equals ($value)
 
 __toString ()
 

Static Public Member Functions

static getConstants ($include_default=false)
 
static cast ($value)
 

Protected Member Functions

 setValue ($value)
 
 isValid ($value)
 

Static Protected Member Functions

static loadValues ()
 

Protected Attributes

 $value
 

Static Protected Attributes

static $enumConstants
 

Detailed Description

Abstract class for Enumeration. Inspired by SplEnum.

The prefix "Abstract" has been left out by intention because a "type" is abstract by definition.

Definition at line 24 of file Enumeration.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Type\Enumeration::__construct (   $value = null)

Member Function Documentation

◆ __toString()

TYPO3\CMS\Core\Type\Enumeration::__toString ( )

◆ cast()

static TYPO3\CMS\Core\Type\Enumeration::cast (   $value)
static

Cast value to enumeration type

Parameters
mixed$valueValue that has to be casted
Returns
self

Definition at line 183 of file Enumeration.php.

References TYPO3\CMS\Core\Type\Enumeration\$value.

Referenced by TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem\__construct(), TYPO3\CMS\Core\Resource\ResourceStorage\addFile(), TYPO3\CMS\Core\Resource\ResourceStorage\addUploadedFile(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\canBeCopied(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\canBeCut(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\canBePastedAfter(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\canBePastedInto(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\canBeRemoved(), TYPO3\CMS\Workspaces\Service\WorkspaceService\canCreatePreviewLink(), TYPO3\CMS\Workspaces\Service\IntegrityService\checkLocalization(), TYPO3\CMS\Version\Dependency\ElementEntityProcessor\createClearDependentElementChildReferenceCallback(), TYPO3\CMS\Version\Dependency\ElementEntityProcessor\createClearDependentElementParentReferenceCallback(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteL10nOverlayRecords(), TYPO3\CMS\Core\DataHandling\DataHandler\deleteVersionsForRecord(), TYPO3\CMS\Backend\Backend\ToolbarItems\SystemInformationToolbarItem\emitLoadMessages(), TYPO3\CMS\Frontend\Page\PageRepository\fixVersioningPid(), TYPO3\CMS\Backend\Utility\BackendUtility\fixVersioningPid(), TYPO3\CMS\Core\Utility\File\ExtendedFileUtility\func_edit(), TYPO3\CMS\Backend\Utility\IconUtility\getIcon(), TYPO3\CMS\IndexedSearch\Tests\Unit\Utility\LikeWildcardTest\getLikeQueryPart(), TYPO3\CMS\Backend\Utility\BackendUtility\getRecordIconAltText(), TYPO3\CMS\Backend\View\PageLayoutView\getTable_pages(), TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\getWhere(), TYPO3\CMS\Backend\Form\FormDataProvider\TcaInline\getWorkspacedUids(), TYPO3\CMS\Backend\Controller\File\FileController\init(), TYPO3\CMS\Filelist\Controller\FileListController\injectFileRepository(), TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode\isDeleted(), TYPO3\CMS\Workspaces\Service\WorkspaceService\isNewPage(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\jsConfirmation(), TYPO3\CMS\Lowlevel\VersionsCommand\main(), TYPO3\CMS\Backend\Controller\PageLayoutController\makeButtons(), TYPO3\CMS\Core\Imaging\IconFactory\mapRecordTypeToOverlayIdentifier(), TYPO3\CMS\Core\Resource\ResourceStorage\moveFile(), TYPO3\CMS\Frontend\Page\PageRepository\movePlhOL(), TYPO3\CMS\Backend\Utility\BackendUtility\movePlhOL(), TYPO3\CMS\Version\Hook\DataHandlerHook\moveRecord(), TYPO3\CMS\Version\Hook\DataHandlerHook\moveRecord_processFieldValue(), TYPO3\CMS\Core\DataHandling\DataHandler\placeholderShadowing(), TYPO3\CMS\Core\Imaging\IconFactory\processAjaxRequest(), TYPO3\CMS\Version\Hook\DataHandlerHook\processCmdmap_deleteAction(), TYPO3\CMS\Core\DataHandling\PlainDataResolver\processVersionOverlays(), TYPO3\CMS\Core\Database\RelationHandler\purgeDeletePlaceholder(), TYPO3\CMS\Core\ViewHelpers\IconViewHelper\render(), TYPO3\CMS\Core\Tests\Unit\ViewHelpers\IconViewHelperTest\renderCallsIconFactoryWithDefaultSizeAndDefaultStateAndReturnsResult(), TYPO3\CMS\Core\Tests\Unit\ViewHelpers\IconViewHelperTest\renderCallsIconFactoryWithGivenOverlayAndReturnsResult(), TYPO3\CMS\Core\Tests\Unit\ViewHelpers\IconViewHelperTest\renderCallsIconFactoryWithGivenSizeAndReturnsResult(), TYPO3\CMS\Core\Tests\Unit\ViewHelpers\IconViewHelperTest\renderCallsIconFactoryWithGivenStateAndReturnsResult(), TYPO3\CMS\IndexedSearch\Domain\Repository\IndexSearchRepository\searchSentence(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\searchSentence(), TYPO3\CMS\IndexedSearch\Domain\Repository\IndexSearchRepository\searchWord(), TYPO3\CMS\IndexedSearch\Controller\SearchFormController\searchWord(), TYPO3\CMS\Core\Utility\File\ExtendedFileUtility\setExistingFilesConflictMode(), TYPO3\CMS\Core\Tests\Unit\Imaging\IconTest\setUp(), TYPO3\CMS\Backend\Utility\BackendUtility\titleAttribForPages(), TYPO3\CMS\Version\Hook\DataHandlerHook\version_clearWSID(), TYPO3\CMS\Core\DataHandling\DataHandler\versionizeRecord(), TYPO3\CMS\Workspaces\Service\WorkspaceService\viewSingleRecord(), TYPO3\CMS\Backend\Utility\BackendUtility\workspaceOL(), and TYPO3\CMS\Core\Database\RelationHandler\writeForeignField().

◆ equals()

TYPO3\CMS\Core\Type\Enumeration::equals (   $value)

Compare if the value of the current object value equals the given value

Parameters
mixed$valuedefault
Returns
bool

Definition at line 198 of file Enumeration.php.

References TYPO3\CMS\Core\Type\Enumeration\$value.

◆ getConstants()

static TYPO3\CMS\Core\Type\Enumeration::getConstants (   $include_default = false)
static

Get the valid values for this enum Defaults to constants you define in your subclass override to provide custom functionality

Parameters
bool$include_default
Returns
array

Definition at line 167 of file Enumeration.php.

References TYPO3\CMS\Core\Type\Enumeration\$enumConstants.

Referenced by TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest\getConstantsReturnsArrayOfPossibleValuesWithDefaultIfRequested(), TYPO3\CMS\Core\Tests\Unit\Type\EnumerationTest\getConstantsReturnsArrayOfPossibleValuesWithoutDefault(), and TYPO3\CMS\Core\Utility\File\ExtendedFileUtility\setExistingFilesConflictMode().

◆ isValid()

TYPO3\CMS\Core\Type\Enumeration::isValid (   $value)
protected

Check if the value on this enum is a valid value for the enum

Parameters
mixed$value
Returns
bool

Definition at line 148 of file Enumeration.php.

References TYPO3\CMS\Core\Type\Enumeration\$value.

Referenced by TYPO3\CMS\Core\Type\Enumeration\__construct().

◆ loadValues()

static TYPO3\CMS\Core\Type\Enumeration::loadValues ( )
staticprotected
Exceptions
Exception

Definition at line 66 of file Enumeration.php.

References TYPO3\CMS\Core\Type\Enumeration\$value.

◆ setValue()

TYPO3\CMS\Core\Type\Enumeration::setValue (   $value)
protected

Set the Enumeration value to the associated enumeration value by a loose comparison. The value, that is used as the enumeration value, will be of the same type like defined in the enumeration

Parameters
mixed$value
Exceptions
Exception

Definition at line 130 of file Enumeration.php.

References TYPO3\CMS\Core\Type\Enumeration\$value.

Referenced by TYPO3\CMS\Core\Type\Enumeration\__construct().

Member Data Documentation

◆ $enumConstants

TYPO3\CMS\Core\Type\Enumeration::$enumConstants
staticprotected

Definition at line 34 of file Enumeration.php.

Referenced by TYPO3\CMS\Core\Type\Enumeration\getConstants().

◆ $value