Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/data-table-theme-block-f…
Browse files Browse the repository at this point in the history
…unction' into feature/data-table-theme-block-function
  • Loading branch information
Kreyu committed Feb 9, 2025
2 parents 2a0af40 + 396fe8d commit fcc92d7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/Twig/DataTableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getFunctions(): array
'needs_environment' => true,
'needs_context' => true,
'is_safe' => ['html'],
])
]),
];

foreach ($definitions as $name => $callable) {
Expand Down Expand Up @@ -399,11 +399,7 @@ public function renderThemeBlock(Environment $environment, array $context, DataT
}
}

throw new RuntimeError(sprintf(
'Block "%s" does not exist on any of the configured data table themes: %s',
$blockName,
implode(', ', array_map(fn (string $theme) => "\"$theme\"", $themes)),
));
throw new RuntimeError(sprintf('Block "%s" does not exist on any of the configured data table themes: %s', $blockName, implode(', ', array_map(fn (string $theme) => "\"$theme\"", $themes))));
}

/**
Expand Down

0 comments on commit fcc92d7

Please sign in to comment.