Skip to content

Commit

Permalink
Issue #457: Support autocomplete when bundle plugin property is ommitted
Browse files Browse the repository at this point in the history
commit 91ee4d9
Author: Peter Sieg <[email protected]>
Date:   Wed Apr 1 16:40:32 2015 -0400

    Support autocomplete across all bundles of an entity when bundle key was not defined.
  • Loading branch information
chasingmaxwell authored and Mateu Aguiló Bosch committed Apr 14, 2015
1 parent 7c9bc9f commit 255ce09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/restful/RestfulEntityBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ protected function getBundlesForAutocomplete() {
$info = $this->getEntityInfo();
// When a bundle key wasn't defined return false in order to make the
// autocomplete support entities without bundle key. i.e: user, vocabulary.
return !empty($info['entity keys']['bundle']) ? array($this->getBundle()) : FALSE;
$bundle = $this->getBundle();
return !empty($bundle) && !empty($info['entity keys']['bundle']) ? array($bundle) : FALSE;
}

/**
Expand Down

0 comments on commit 255ce09

Please sign in to comment.