Skip to content

Commit 255ce09

Browse files
chasingmaxwellMateu Aguiló Bosch
authored and
Mateu Aguiló Bosch
committedApr 14, 2015
Issue #457: Support autocomplete when bundle plugin property is ommitted
commit 91ee4d9 Author: Peter Sieg <chasingmaxwell@gmail.com> Date: Wed Apr 1 16:40:32 2015 -0400 Support autocomplete across all bundles of an entity when bundle key was not defined.

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎plugins/restful/RestfulEntityBase.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ protected function getBundlesForAutocomplete() {
205205
$info = $this->getEntityInfo();
206206
// When a bundle key wasn't defined return false in order to make the
207207
// autocomplete support entities without bundle key. i.e: user, vocabulary.
208-
return !empty($info['entity keys']['bundle']) ? array($this->getBundle()) : FALSE;
208+
$bundle = $this->getBundle();
209+
return !empty($bundle) && !empty($info['entity keys']['bundle']) ? array($bundle) : FALSE;
209210
}
210211

211212
/**

0 commit comments

Comments
 (0)
Please sign in to comment.