Skip to content

Commit

Permalink
Merge pull request #24 from wernerkrauss/fix-virtuallinkedsummary
Browse files Browse the repository at this point in the history
fix VirtualLinkedSummary for autocompletefield
  • Loading branch information
wilr authored Mar 18, 2019
2 parents 2b1919b + 4a2ede3 commit c5b8da2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Extension/BaseElementExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ public function getVirtualElements()
/**
* @return string
*/
public function VirtualLinkedSummary()
public function getVirtualLinkedSummary()
{
return sprintf('%s (%s #%s)', $this->Title, $this->Type(), $this->ID);
return sprintf('%s (%s #%s)', $this->owner->Title, $this->owner->getType(), $this->owner->ID);
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/Model/ElementVirtual.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function getCMSFields()
);

$autocomplete->setLabelField('VirtualLinkedSummary');
$autocomplete->setDisplayField('VirtualLinkedSummary');

$fields->replaceField(
'LinkedElementID',
Expand Down

0 comments on commit c5b8da2

Please sign in to comment.