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

Public Member Functions | List of all members
eZ\Publish\Core\Base\Translatable Interface Reference

Interface for translatable value objects. More...

Inheritance diagram for eZ\Publish\Core\Base\Translatable:

## Public Member Functions
| getMessageTemplate ()
| Returns the message template, with placeholders for parameters. More...
| setMessageTemplate ($messageTemplate)
| Injects the message template. More...
| getParameters ()
| Returns a hash map with param placeholder as key and its corresponding value. More...
| setParameters (array $parameters)
| Injects the hash map, with param placeholder as key and its corresponding value. More...
| addParameter ($name, $value)
| Adds a parameter to existing hash map. More...
| addParameters (array $parameters)
| Adds $parameters to existing hash map. More...
| getBaseTranslation ()
| Returns base translation, computed with message template and parameters. More...

## Detailed Description

Interface for translatable value objects.

Definition at line 12 of file Core/Base/Translatable.php.

## Member Function Documentation

## ◆ addParameter()

eZ\Publish\Core\Base\Translatable::addParameter | ( |  | $name,
|  |  | $value
| ) |  |

Adds a parameter to existing hash map.

Parameters

  string | $name |
  string | $value |

Referenced by eZ\Publish\Core\Base\Exceptions\MissingClass\__construct(), and eZ\Publish\Core\Base\Exceptions\UnauthorizedException\__construct().

## ◆ addParameters()

eZ\Publish\Core\Base\Translatable::addParameters | ( | array | $parameters | ) |

Adds $parameters to existing hash map.

Parameters

  array | $parameters |

Referenced by eZ\Publish\Core\Base\Exceptions\InvalidArgumentType\__construct(), and eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue\__construct().

## ◆ getBaseTranslation()

eZ\Publish\Core\Base\Translatable::getBaseTranslation | ( |  | ) |

Returns base translation, computed with message template and parameters.

Returns
  string

Referenced by eZ\Publish\Core\Base\Exceptions\InvalidArgumentType\__construct(), eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue\__construct(), eZ\Publish\Core\Base\Exceptions\BadStateException\__construct(), eZ\Publish\Core\Base\Exceptions\InvalidArgumentException\__construct(), eZ\Publish\Core\Base\Exceptions\MissingClass\__construct(), eZ\Publish\Core\Base\Exceptions\NotFound\FieldTypeNotFoundException\__construct(), eZ\Publish\Core\IO\Exception\InvalidBinaryAbsolutePathException\__construct(), eZ\Publish\Core\IO\Exception\InvalidBinaryPrefixException\__construct(), eZ\Publish\Core\Base\Exceptions\NotFound\LimitationNotFoundException\__construct(), eZ\Publish\Core\Base\Exceptions\ContentTypeValidationException\__construct(), eZ\Publish\Core\Base\Exceptions\ContentValidationException\__construct(), eZ\Publish\Core\Base\Exceptions\ForbiddenException\__construct(), eZ\Publish\Core\Base\Exceptions\UnauthorizedException\__construct(), eZ\Publish\Core\Base\Exceptions\NotFoundException\__construct(), eZ\Publish\Core\Base\Exceptions\ContentFieldValidationException\__construct(), eZ\Publish\Core\Base\Exceptions\ContentTypeFieldDefinitionValidationException\__construct(), and eZ\Publish\Core\Base\Exceptions\LimitationValidationException\__construct().

## ◆ getMessageTemplate()

eZ\Publish\Core\Base\Translatable::getMessageTemplate | ( |  | ) |

Returns the message template, with placeholders for parameters.

E.g. "Content with ID %contentId% could not be found".

Returns
  string

Referenced by eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue\__construct().

## ◆ getParameters()

eZ\Publish\Core\Base\Translatable::getParameters | ( |  | ) |

Returns a hash map with param placeholder as key and its corresponding value.

E.g. array('contentId' => 123).

Returns
  array

## ◆ setMessageTemplate()

eZ\Publish\Core\Base\Translatable::setMessageTemplate | ( |  | $messageTemplate | ) |

Injects the message template.

Parameters

  string | $messageTemplate |

Referenced by eZ\Publish\Core\Base\Exceptions\InvalidArgumentType\__construct(), eZ\Publish\Core\Base\Exceptions\InvalidArgumentValue\__construct(), eZ\Publish\Core\Base\Exceptions\BadStateException\__construct(), eZ\Publish\Core\Base\Exceptions\InvalidArgumentException\__construct(), eZ\Publish\Core\Base\Exceptions\MissingClass\__construct(), eZ\Publish\Core\Base\Exceptions\NotFound\FieldTypeNotFoundException\__construct(), eZ\Publish\Core\IO\Exception\InvalidBinaryAbsolutePathException\__construct(), eZ\Publish\Core\IO\Exception\InvalidBinaryPrefixException\__construct(), eZ\Publish\Core\Base\Exceptions\NotFound\LimitationNotFoundException\__construct(), eZ\Publish\Core\Base\Exceptions\ContentTypeValidationException\__construct(), eZ\Publish\Core\Base\Exceptions\ContentValidationException\__construct(), eZ\Publish\Core\Base\Exceptions\ForbiddenException\__construct(), eZ\Publish\Core\Base\Exceptions\UnauthorizedException\__construct(), eZ\Publish\Core\Base\Exceptions\NotFoundException\__construct(), eZ\Publish\Core\Base\Exceptions\ContentFieldValidationException\__construct(), eZ\Publish\Core\Base\Exceptions\ContentTypeFieldDefinitionValidationException\__construct(), and eZ\Publish\Core\Base\Exceptions\LimitationValidationException\__construct().

## ◆ setParameters()

eZ\Publish\Core\Base\Translatable::setParameters | ( | array | $parameters | ) |

Injects the hash map, with param placeholder as key and its corresponding value.

E.g. array('contentId' => 123). If parameters already existed, they will be replaced by the passed here.

Parameters

  array | $parameters |

Referenced by eZ\Publish\Core\Base\Exceptions\BadStateException\__construct(), eZ\Publish\Core\Base\Exceptions\InvalidArgumentException\__construct(), eZ\Publish\Core\Base\Exceptions\MissingClass\__construct(), eZ\Publish\Core\Base\Exceptions\NotFound\FieldTypeNotFoundException\__construct(), eZ\Publish\Core\IO\Exception\InvalidBinaryAbsolutePathException\__construct(), eZ\Publish\Core\IO\Exception\InvalidBinaryPrefixException\__construct(), eZ\Publish\Core\Base\Exceptions\NotFound\LimitationNotFoundException\__construct(), eZ\Publish\Core\Base\Exceptions\ContentTypeValidationException\__construct(), eZ\Publish\Core\Base\Exceptions\ContentValidationException\__construct(), eZ\Publish\Core\Base\Exceptions\ForbiddenException\__construct(), eZ\Publish\Core\Base\Exceptions\UnauthorizedException\__construct(), and eZ\Publish\Core\Base\Exceptions\NotFoundException\__construct().

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

- Core/Base/Translatable.php

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