protected function SalesforceMappingFormCrudBase::getEntityTypeOptions in Salesforce Suite 8.3
Return a list of Drupal entity types for mapping.
Return value
array An array of values keyed by machine name of the entity with the label as the value, formatted to be appropriate as a value for #options.
2 calls to SalesforceMappingFormCrudBase::getEntityTypeOptions()
- SalesforceMappingFormCrudBase::buildForm in modules/
salesforce_mapping/ src/ Form/ SalesforceMappingFormCrudBase.php - Form constructor.
- SalesforceMappingFormCrudBase::getBundleOptions in modules/
salesforce_mapping/ src/ Form/ SalesforceMappingFormCrudBase.php - Return an array of all bundle options, for javascript-free fallback.
File
- modules/
salesforce_mapping/ src/ Form/ SalesforceMappingFormCrudBase.php, line 449
Class
- SalesforceMappingFormCrudBase
- Salesforce Mapping Form base.
Namespace
Drupal\salesforce_mapping\FormCode
protected function getEntityTypeOptions() {
$options = [];
$mappable_entity_types = $this->mappableEntityTypes
->getMappableEntityTypes();
foreach ($mappable_entity_types as $entity_type_id => $info) {
$options[$info
->id()] = $info
->getLabel();
}
uasort($options, function ($a, $b) {
return strcmp($a
->render(), $b
->render());
});
return $options;
}