Skip to content

Commit

Permalink
ObjectTags: Remove superfluos table name prefix from the column defin…
Browse files Browse the repository at this point in the history
…ition
  • Loading branch information
sukhwinder33445 committed Dec 19, 2023
1 parent 4ba49e7 commit 8335815
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions library/Notifications/Model/Behavior/ObjectTags.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,7 @@ public function rewriteColumn($column, $relation = null): AliasedExpression

public function rewriteColumnDefinition(ColumnDefinition $def, string $relation): void
{
$parts = explode('.', substr($relation, 0, -4));
$objectType = array_pop($parts);

$name = $def->getName();
// Programmatically translated since the full definition is available in class ObjectSuggestions
$def->setLabel(sprintf(t(ucfirst($objectType) . ' %s', '..<tag-name>'), $name));
$def->setLabel(ucfirst($def->getName()));
}

public function isSelectableColumn(string $name): bool
Expand Down

0 comments on commit 8335815

Please sign in to comment.