1 entityreference.admin.test protected EntityReferenceAdminTestCase::getAllOptionsList($element)

Extract all the options of a select element.

File

core/modules/entityreference/tests/entityreference.admin.test, line 47
Contains EntityReferenceHandlersTestCase

Class

EntityReferenceAdminTestCase
Test for Entity Reference admin UI.

Code

protected function getAllOptionsList($element) {
  $options = array();
  // Add all options items.
  foreach ($element->option as $option) {
    $options[] = (string) $option['value'];
  }
  // TODO: support optgroup.
  return $options;
}