You are here

protected function MentionsSettingsForm::getContentEntityTypes in Open Social 8.2

Same name and namespace in other branches
  1. 8.9 modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  2. 8 modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  3. 8.3 modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  4. 8.4 modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  5. 8.5 modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  6. 8.6 modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  7. 8.7 modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  8. 8.8 modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  9. 10.3.x modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  10. 10.0.x modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  11. 10.1.x modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()
  12. 10.2.x modules/custom/mentions/src/Form/MentionsSettingsForm.php \Drupal\mentions\Form\MentionsSettingsForm::getContentEntityTypes()

Get content entity types keyed by id.

Return value

array Returns array of content entity types.

1 call to MentionsSettingsForm::getContentEntityTypes()
MentionsSettingsForm::buildForm in modules/custom/mentions/src/Form/MentionsSettingsForm.php
Form constructor.

File

modules/custom/mentions/src/Form/MentionsSettingsForm.php, line 103

Class

MentionsSettingsForm
Configure mentions settings.

Namespace

Drupal\mentions\Form

Code

protected function getContentEntityTypes() {
  $options = [];
  foreach ($this->entityTypeManager
    ->getDefinitions() as $entity_type) {
    if ($entity_type instanceof ContentEntityTypeInterface) {
      $options[$entity_type
        ->id()] = $entity_type
        ->getLabel();
    }
  }
  return $options;
}