function EntityDisplayRepository::getFormModeOptionsByBundle
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/EntityDisplayRepository.php \Drupal\Core\Entity\EntityDisplayRepository::getFormModeOptionsByBundle()
- 10 core/lib/Drupal/Core/Entity/EntityDisplayRepository.php \Drupal\Core\Entity\EntityDisplayRepository::getFormModeOptionsByBundle()
- 9 core/lib/Drupal/Core/Entity/EntityDisplayRepository.php \Drupal\Core\Entity\EntityDisplayRepository::getFormModeOptionsByBundle()
- 8.9.x core/lib/Drupal/Core/Entity/EntityDisplayRepository.php \Drupal\Core\Entity\EntityDisplayRepository::getFormModeOptionsByBundle()
Returns an array of enabled form mode options by bundle.
Parameters
string $entity_type_id: The entity type whose form mode options should be returned.
string $bundle: The name of the bundle.
Return value
array An associative array containing enabled form mode options for the specified entity type and bundle. The array is keyed by the display mode ID, and each value is a form mode label.
Overrides EntityDisplayRepositoryInterface::getFormModeOptionsByBundle
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityDisplayRepository.php, line 177
Class
- EntityDisplayRepository
- Provides a repository for entity display objects (view modes and form modes).
Namespace
Drupal\Core\EntityCode
public function getFormModeOptionsByBundle($entity_type_id, $bundle) {
return $this->getDisplayModeOptionsByBundle('form_mode', $entity_type_id, $bundle);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.