protected function EntityAutocompleteElementFormTest::getAutocompleteInput in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Entity/Element/EntityAutocompleteElementFormTest.php \Drupal\system\Tests\Entity\Element\EntityAutocompleteElementFormTest::getAutocompleteInput()
Returns an entity label in the format needed by the EntityAutocomplete element.
Parameters
\Drupal\Core\Entity\EntityInterface $entity: A Drupal entity.
Return value
string A string that can be used as a value for EntityAutocomplete elements.
1 call to EntityAutocompleteElementFormTest::getAutocompleteInput()
- EntityAutocompleteElementFormTest::testValidEntityAutocompleteElement in core/
modules/ system/ src/ Tests/ Entity/ Element/ EntityAutocompleteElementFormTest.php - Tests valid entries in the EntityAutocomplete Form API element.
File
- core/
modules/ system/ src/ Tests/ Entity/ Element/ EntityAutocompleteElementFormTest.php, line 328 - Contains \Drupal\system\Tests\Entity\Element\EntityAutocompleteElementFormTest.
Class
- EntityAutocompleteElementFormTest
- Tests the EntityAutocomplete Form API element.
Namespace
Drupal\system\Tests\Entity\ElementCode
protected function getAutocompleteInput(EntityInterface $entity) {
return EntityAutocomplete::getEntityLabels(array(
$entity,
));
}