Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
eZ\Publish\Core\FieldType\Author\Type Class Reference

Author field type. More...

Inheritance diagram for eZ\Publish\Core\FieldType\Author\Type:

## Public Member Functions
| getFieldTypeIdentifier ()
| Returns the field type identifier for this field type. More...
| getName (SPIValue $value)
| Returns the name of the given field value. More...
| getEmptyValue ()
| Returns the fallback default value of field type when no such default value is provided in the field definition in content types. More...
| fromHash ($hash)
| Converts an $hash to the Value defined by the field type. More...
| toHash (SPIValue $value)
| Converts a $Value to a hash. More...
| isSearchable ()
| Returns whether the field type is searchable. More...
| validateFieldSettings ($fieldSettings)
| Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. More...
Public Member Functions inherited from eZ\Publish\Core\FieldType\FieldType
| setTransformationProcessor (TransformationProcessor $transformationProcessor)
| getSettingsSchema ()
| Returns a schema for the settings expected by the FieldType. More...
| getValidatorConfigurationSchema ()
| Returns a schema for the validator configuration expected by the FieldType. More...
| validate (FieldDefinition $fieldDefinition, SPIValue $value)
| Validates a field based on the validators in the field definition. More...
| validateValidatorConfiguration ($validatorConfiguration)
| Validates the validatorConfiguration of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct. More...
| applyDefaultValidatorConfiguration (&$validatorConfiguration)
| Applies the default values to the given $validatorConfiguration of a FieldDefinitionCreateStruct. More...
| applyDefaultSettings (&$fieldSettings)
| Applies the default values to the fieldSettings of a FieldDefinitionCreateStruct. More...
| toPersistenceValue (SPIValue $value)
| Converts a $value to a persistence value. More...
| fromPersistenceValue (PersistenceValue $fieldValue)
| Converts a persistence $fieldValue to a Value. More...
| isSingular ()
| Indicates if the field definition of this type can appear only once in the same ContentType. More...
| onlyEmptyInstance ()
| Indicates if the field definition of this type can be added to a ContentType with Content instances. More...
| isEmptyValue (SPIValue $value)
| Returns if the given $value is considered empty by the field type. More...
| acceptValue ($inputValue)
| Potentially builds and checks the type and structure of the $inputValue. More...
| fieldSettingsToHash ($fieldSettings)
| Converts the given $fieldSettings to a simple hash format. More...
| fieldSettingsFromHash ($fieldSettingsHash)
| Converts the given $fieldSettingsHash to field settings of the type. More...
| validatorConfigurationToHash ($validatorConfiguration)
| Converts the given $validatorConfiguration to a simple hash format. More...
| validatorConfigurationFromHash ($validatorConfigurationHash)
| Converts the given $validatorConfigurationHash to a validator configuration of the type. More...
| getRelations (SPIValue $fieldValue)
| Returns relation data extracted from value. More...
| valuesEqual (SPIValue $value1, SPIValue $value2)
Public Member Functions inherited from eZ\Publish\SPI\FieldType\FieldType
| getName (Value $value)
| Returns a human readable string representation from the given $value. More...
| validate (FieldDefinition $fieldDef, Value $value)
| Validates a field based on the validator configuration in the field definition. More...
| isEmptyValue (Value $value)
| Returns if the given $value is considered empty by the field type. More...
| toHash (Value $value)
| Converts the given $value into a plain hash format. More...
| toPersistenceValue (Value $value)
| Converts a $value to a persistence value. More...
| fromPersistenceValue (FieldValue $fieldValue)
| Converts a persistence $value to a Value. More...
| getRelations (Value $value)
| Returns relation data extracted from value. More...
Public Member Functions inherited from eZ\Publish\SPI\FieldType\Comparable
| valuesEqual (Value $value1, Value $value2)

## Public Attributes
const | DEFAULT_VALUE_EMPTY = 0
| Flag which stands for setting Author FieldType empty by default. More...
const | DEFAULT_CURRENT_USER = 1
| Flag which stands for prefilling Author FieldType with current user by default. More...

## Protected Member Functions
| createValueFromInput ($inputValue)
| Inspects given $inputValue and potentially converts it into a dedicated value object. More...
| checkValueStructure (BaseValue $value)
| Throws an exception if value structure is not of expected format. More...
| getSortInfo (BaseValue $value)
| {} More...
Protected Member Functions inherited from eZ\Publish\Core\FieldType\FieldType
| getSortInfo (Value $value)
| Returns information for FieldValue->$sortKey relevant to the field type. More...
| checkValueStructure (Value $value)
| Throws an exception if value structure is not of expected format. More...

## Protected Attributes
| $settingsSchema
Protected Attributes inherited from eZ\Publish\Core\FieldType\FieldType
| $settingsSchema = []
| $validatorConfigurationSchema = []
| $transformationProcessor

## Private Member Functions
| validateSettingName ($name)
| Validates the fieldSetting name. More...
| validateDefaultAuthorSetting ($name, $value)
| Validates if the defaultAuthor setting has one of the defined values. More...

## Additional Inherited Members
Static Protected Member Functions inherited from eZ\Publish\Core\FieldType\FieldType
static | checkValueType ($value)
| Throws an exception if the given $value is not an instance of the supported value subtype. More...

## Detailed Description

Author field type.

Field type representing a list of authors, consisting of author name, and author email.

Definition at line 21 of file Core/FieldType/Author/Type.php.

## Member Function Documentation

## ◆ checkValueStructure()

eZ\Publish\Core\FieldType\Author\Type::checkValueStructure | ( | BaseValue | $value | ) |
| protected

Throws an exception if value structure is not of expected format.

Exceptions

Definition at line 101 of file Core/FieldType/Author/Type.php.

## ◆ createValueFromInput()

eZ\Publish\Core\FieldType\Author\Type::createValueFromInput | ( |  | $inputValue | ) |
| protected

Inspects given $inputValue and potentially converts it into a dedicated value object.

Parameters

  array | \eZ\Publish\Core\FieldType\Author\Value | $inputValue |

Returns
  \eZ\Publish\Core\FieldType\Author\Value The potentially converted and structurally plausible value.

Reimplemented from eZ\Publish\Core\FieldType\FieldType.

Definition at line 85 of file Core/FieldType/Author/Type.php.

## ◆ fromHash()

eZ\Publish\Core\FieldType\Author\Type::fromHash | ( |  | $hash | ) |

Converts an $hash to the Value defined by the field type.

Parameters

  mixed | $hash |

Returns
  \eZ\Publish\Core\FieldType\Author\Value $value

Implements eZ\Publish\SPI\FieldType\FieldType.

Definition at line 138 of file Core/FieldType/Author/Type.php.

## ◆ getEmptyValue()

eZ\Publish\Core\FieldType\Author\Type::getEmptyValue | ( |  | ) |

Returns the fallback default value of field type when no such default value is provided in the field definition in content types.

Returns
  \eZ\Publish\Core\FieldType\Author\Value

Implements eZ\Publish\SPI\FieldType\FieldType.

Definition at line 73 of file Core/FieldType/Author/Type.php.

## ◆ getFieldTypeIdentifier()

eZ\Publish\Core\FieldType\Author\Type::getFieldTypeIdentifier | ( |  | ) |

Returns the field type identifier for this field type.

Returns
  string

Implements eZ\Publish\SPI\FieldType\FieldType.

Definition at line 47 of file Core/FieldType/Author/Type.php.

## ◆ getName()

eZ\Publish\Core\FieldType\Author\Type::getName | ( | SPIValue | $value | ) |

Returns the name of the given field value.

It will be used to generate content name and url alias if current field is designated to be used in the content name/urlAlias pattern.

Parameters

  \eZ\Publish\Core\FieldType\Author\Value | $value |

Returns
  string

Definition at line 62 of file Core/FieldType/Author/Type.php.

## ◆ getSortInfo()

eZ\Publish\Core\FieldType\Author\Type::getSortInfo | ( | BaseValue | $value | ) |
| protected

{}

Definition at line 115 of file Core/FieldType/Author/Type.php.

## ◆ isSearchable()

eZ\Publish\Core\FieldType\Author\Type::isSearchable | ( |  | ) |

Returns whether the field type is searchable.

Returns
  bool

Reimplemented from eZ\Publish\Core\FieldType\FieldType.

Definition at line 172 of file Core/FieldType/Author/Type.php.

## ◆ toHash()

eZ\Publish\Core\FieldType\Author\Type::toHash | ( | SPIValue | $value | ) |

Converts a $Value to a hash.

Parameters

  \eZ\Publish\Core\FieldType\Author\Value | $value |

Returns
  mixed

Definition at line 157 of file Core/FieldType/Author/Type.php.

## ◆ validateDefaultAuthorSetting()

eZ\Publish\Core\FieldType\Author\Type::validateDefaultAuthorSetting | ( |  | $name,
|  |  | $value
| ) |  |
| private

Validates if the defaultAuthor setting has one of the defined values.

Parameters

  string | $name |
  string | $value |

Returns
  \eZ\Publish\SPI\FieldType\ValidationError|null

Definition at line 239 of file Core/FieldType/Author/Type.php.

References eZ\Publish\Core\FieldType\Author\Type\DEFAULT_CURRENT_USER, and eZ\Publish\Core\FieldType\Author\Type\DEFAULT_VALUE_EMPTY.

Referenced by eZ\Publish\Core\FieldType\Author\Type\validateFieldSettings().

## ◆ validateFieldSettings()

eZ\Publish\Core\FieldType\Author\Type::validateFieldSettings | ( |  | $fieldSettings | ) |

Validates the fieldSettings of a FieldDefinitionCreateStruct or FieldDefinitionUpdateStruct.

Parameters

  array | $fieldSettings |

Returns
  \eZ\Publish\SPI\FieldType\ValidationError[]

Reimplemented from eZ\Publish\Core\FieldType\FieldType.

Definition at line 184 of file Core/FieldType/Author/Type.php.

References eZ\Publish\Core\FieldType\Author\Type\validateDefaultAuthorSetting(), and eZ\Publish\Core\FieldType\Author\Type\validateSettingName().

## ◆ validateSettingName()

eZ\Publish\Core\FieldType\Author\Type::validateSettingName | ( |  | $name | ) |
| private

Validates the fieldSetting name.

Parameters

  string | $name |

Returns
  \eZ\Publish\SPI\FieldType\ValidationError|null

Definition at line 215 of file Core/FieldType/Author/Type.php.

Referenced by eZ\Publish\Core\FieldType\Author\Type\validateFieldSettings().

## Member Data Documentation

## ◆ $settingsSchema

eZ\Publish\Core\FieldType\Author\Type::$settingsSchema
| protected

Initial value:
= [
'defaultAuthor' => [
'type' => 'choice',
'default' => self::DEFAULT_VALUE_EMPTY,
],
]
eZ\Publish\Core\FieldType\Author\Type\DEFAULT_VALUE_EMPTY
const DEFAULT_VALUE_EMPTY
Flag which stands for setting Author FieldType empty by default.
Definition: Core/FieldType/Author/Type.php:27

Definition at line 35 of file Core/FieldType/Author/Type.php.

## ◆ DEFAULT_CURRENT_USER

const eZ\Publish\Core\FieldType\Author\Type::DEFAULT_CURRENT_USER = 1

Flag which stands for prefilling Author FieldType with current user by default.

It is used in a Content Type edit view.

Definition at line 33 of file Core/FieldType/Author/Type.php.

Referenced by eZ\Publish\Core\FieldType\Author\Type\validateDefaultAuthorSetting().

## ◆ DEFAULT_VALUE_EMPTY

const eZ\Publish\Core\FieldType\Author\Type::DEFAULT_VALUE_EMPTY = 0

Flag which stands for setting Author FieldType empty by default.

It is used in a Content Type edit view.

Definition at line 27 of file Core/FieldType/Author/Type.php.

Referenced by eZ\Publish\Core\FieldType\Author\Type\validateDefaultAuthorSetting().

The documentation for this class was generated from the following file:

- Core/FieldType/Author/Type.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.