Deprecated: Constant E_STRICT is deprecated in /home/pastorz/old-espace-client/vendor/symfony/error-handler/ErrorHandler.php on line 58
Deprecated: Constant E_STRICT is deprecated in /home/pastorz/old-espace-client/vendor/symfony/error-handler/ErrorHandler.php on line 76 Symfony Profiler
vendor/easycorp/easyadmin-bundle/src/Config/Crud.php line 359
* @param TranslatableInterface|string|callable $label The callable signature is: fn ($entityInstance, $pageName): string
*
* @psalm-param mixed $label
*/
public function setEntityLabelInSingular(/* @var TranslatableInterface|string|callable */ $label): self
{
if (!\is_string($label) && !$label instanceof TranslatableInterface && !\is_callable($label)) {
trigger_deprecation(
'easycorp/easyadmin-bundle',
'4.0.5',
'Argument "%s" for "%s" must be one of these types: %s. Passing type "%s" will cause an error in 5.0.0.',
'$label',
__METHOD__,
'"string" or "TranslatableInterface" or "callable"',
\gettype($label)
);
}
$this->dto->setEntityLabelInSingular($label);
return $this;
}
/**
* @param TranslatableInterface|string|callable $label The callable signature is: fn ($entityInstance, $pageName): string
*
* @psalm-param mixed $label
*/
public function setEntityLabelInPlural(/* @var TranslatableInterface|string|callable */ $label): self
{
if (!\is_string($label) && !$label instanceof TranslatableInterface && !\is_callable($label)) {
trigger_deprecation(
'easycorp/easyadmin-bundle',
'4.0.5',
'Argument "%s" for "%s" must be one of these types: %s. Passing type "%s" will cause an error in 5.0.0.',
'$label',
__METHOD__,
'"string" or "callable"',
\gettype($label)
);
}
$this->dto->setEntityLabelInPlural($label);
return $this;
}
/**
* @param TranslatableInterface|string|callable $title The callable signature is: fn ($entityInstance): string
*
* @psalm-param mixed $title
*/
public function setPageTitle(string $pageName, /* @var TranslatableInterface|string|callable */ $title): self
{
if (!\is_string($title) && !$title instanceof TranslatableInterface && !\is_callable($title)) {
trigger_deprecation(
'easycorp/easyadmin-bundle',
'4.0.5',
'Argument "%s" for "%s" must be one of these types: %s. Passing type "%s" will cause an error in 5.0.0.',
'$title',
__METHOD__,
'"string" or "TranslatableInterface" or "callable"',
\gettype($title)
);
}
if (!\in_array($pageName, $this->getValidPageNames(), true)) {
throw new \InvalidArgumentException(sprintf('The first argument of the "%s()" method must be one of these valid page names: %s ("%s" given).', __METHOD__, implode(', ', $this->getValidPageNames()), $pageName));
public function setHelp(string $pageName, TranslatableInterface|string $helpMessage): self
{
if (!\in_array($pageName, $this->getValidPageNames(), true)) {
throw new \InvalidArgumentException(sprintf('The first argument of the "%s()" method must be one of these valid page names: %s ("%s" given).', __METHOD__, implode(', ', $this->getValidPageNames()), $pageName));
* @param string $formatOrPattern A format name ('short', 'medium', 'long', 'full') or a valid ICU Datetime Pattern (see https://unicode-org.github.io/icu/userguide/format_parse/datetime/)
*/
public function setDateFormat(string $formatOrPattern): self
{
if (DateTimeField::FORMAT_NONE === $formatOrPattern || '' === trim($formatOrPattern)) {
throw new \InvalidArgumentException(sprintf('The first argument of the "%s()" method cannot be "%s" or an empty string. Use either the special date formats (%s) or a datetime Intl pattern.', __METHOD__, DateTimeField::FORMAT_NONE, implode(', ', $validDateFormatsWithoutNone)));
* @param string $formatOrPattern A format name ('short', 'medium', 'long', 'full') or a valid ICU Datetime Pattern (see https://unicode-org.github.io/icu/userguide/format_parse/datetime/)
*/
public function setTimeFormat(string $formatOrPattern): self
{
if (DateTimeField::FORMAT_NONE === $formatOrPattern || '' === trim($formatOrPattern)) {
throw new \InvalidArgumentException(sprintf('The first argument of the "%s()" method cannot be "%s" or an empty string. Use either the special time formats (%s) or a datetime Intl pattern.', __METHOD__, DateTimeField::FORMAT_NONE, implode(', ', $validTimeFormatsWithoutNone)));
* @param string $dateFormatOrPattern A format name ('none', 'short', 'medium', 'long', 'full') or a valid ICU Datetime Pattern (see https://unicode-org.github.io/icu/userguide/format_parse/datetime/)
* @param string $timeFormat A format name ('none', 'short', 'medium', 'long', 'full')
*/
public function setDateTimeFormat(string $dateFormatOrPattern, string $timeFormat = DateTimeField::FORMAT_NONE): self
{
if ('' === trim($dateFormatOrPattern)) {
throw new \InvalidArgumentException(sprintf('The first argument of the "%s()" method cannot be an empty string. Use either a date format (%s) or a datetime Intl pattern.', __METHOD__, implode(', ', DateTimeField::VALID_DATE_FORMATS)));
throw new \InvalidArgumentException(sprintf('The values of the arguments of "%s()" cannot be "%s" or an empty string at the same time. Change any of them (or both).', __METHOD__, DateTimeField::FORMAT_NONE));
}
// when date format/pattern is none and time format is a pattern,
// silently turn them into a datetime pattern
if (DateTimeField::FORMAT_NONE === $dateFormatOrPattern && !\in_array($timeFormat, DateTimeField::VALID_DATE_FORMATS, true)) {
if ($isDatePattern && DateTimeField::FORMAT_NONE !== $timeFormat) {
throw new \InvalidArgumentException(sprintf('When the first argument of "%s()" is a datetime pattern, you cannot set the time format in the second argument (define the time format inside the datetime pattern).', __METHOD__));
}
if (!$isDatePattern && !\in_array($timeFormat, DateTimeField::VALID_DATE_FORMATS, true)) {
throw new \InvalidArgumentException(sprintf('The value of the time format can only be one of the following: %s (but "%s" was given).', implode(', ', DateTimeField::VALID_DATE_FORMATS), $timeFormat));
public function setDateIntervalFormat(string $format): self
{
$this->dto->setDateIntervalFormat($format);
return $this;
}
public function setTimezone(string $timezoneId): self
{
if (!\in_array($timezoneId, timezone_identifiers_list(), true)) {
throw new \InvalidArgumentException(sprintf('The "%s" timezone is not a valid PHP timezone ID. Use any of the values listed at https://www.php.net/manual/en/timezones.php', $timezoneId));
}
$this->dto->setTimezone($timezoneId);
return $this;
}
public function setNumberFormat(string $format): self
foreach ($sortFieldsAndOrder as $sortField => $sortOrder) {
if (!\in_array($sortOrder, [SortOrder::ASC, SortOrder::DESC], true)) {
throw new \InvalidArgumentException(sprintf('The sort order can be only "%s" or "%s", "%s" given.', SortOrder::ASC, SortOrder::DESC, $sortOrder));
}
if (!\is_string($sortField)) {
throw new \InvalidArgumentException(sprintf('The keys of the array that defines the default sort must be strings with the field names, but the given "%s" value is a "%s".', $sortField, \gettype($sortField)));
}
}
$this->dto->setDefaultSort($sortFieldsAndOrder);
return $this;
}
public function setSearchFields(?array $fieldNames): self
{
$this->dto->setSearchFields($fieldNames);
return $this;
}
public function setAutofocusSearch(bool $autofocusSearch = true): self
{
$this->dto->setAutofocusSearch($autofocusSearch);
return $this;
}
public function showEntityActionsInlined(bool $showInlined = true): self
public function addFormTheme(string $themePath): self
{
$this->dto->addFormTheme($themePath);
return $this;
}
public function setFormThemes(array $themePaths): self
{
foreach ($themePaths as $path) {
if (!\is_string($path)) {
throw new \InvalidArgumentException(sprintf('All form theme paths passed to the "%s" method must be strings, but at least one of those values is of type "%s".', __METHOD__, \gettype($path)));
}
}
$this->dto->setFormThemes($themePaths);
return $this;
}
public function setFormOptions(array $newFormOptions, array $editFormOptions = null): self