Skip to content

Commit

Permalink
Fixed category alias callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Feb 12, 2024
1 parent b88d947 commit caa7aad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/EventListener/DataContainer/NewsCategoryAliasListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function __construct(
) {
}

#[AsCallback('tl_news_categories', 'fields.alias.save')]
#[AsCallback('tl_news_category', 'fields.alias.save')]
public function validateAlias(string $value, DataContainer $dc): string
{
if ('' !== $value && $this->aliasExists($value, $dc)) {
Expand All @@ -37,7 +37,7 @@ public function validateAlias(string $value, DataContainer $dc): string
return $value;
}

#[AsCallback('tl_news_categories', 'config.onbeforesubmit')]
#[AsCallback('tl_news_category', 'config.onbeforesubmit')]
public function generateAlias(array $values, DataContainer $dc): array
{
if (!isset($values['alias']) || '' !== $values['alias']) {
Expand Down

0 comments on commit caa7aad

Please sign in to comment.