Skip to content

Commit

Permalink
replace suffix " ID" only as in atk4/data
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Jan 12, 2025
1 parent f053ae7 commit 7568172
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/Layout.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ protected function recursiveRender(): void
if ($label === null) {
$label = $element->entityField->getField()->getCaption();
if (property_exists($element, 'model')) {
$label = preg_replace('~^(?:.*\K ID$|ID )~s', '', $label);
$label = preg_replace('~ ID$~i', '', $label);
}
}

Expand Down

0 comments on commit 7568172

Please sign in to comment.