You are here

protected function ComponentSectionForm::getFormComponentProperties in Module Builder 8.3

Gets the names of properties this form should show.

Return value

string[] An array of property names.

3 calls to ComponentSectionForm::getFormComponentProperties()
ComponentSectionForm::componentPropertiesForm in src/Form/ComponentSectionForm.php
Add form elements for the specified component properties.
ComponentSectionForm::copyFormValuesToEntity in src/Form/ComponentSectionForm.php
Copies top-level form values to entity properties
ComponentSectionForm::validateForm in src/Form/ComponentSectionForm.php
Form validation handler.
3 methods override ComponentSectionForm::getFormComponentProperties()
ModuleHooksForm::getFormComponentProperties in src/Form/ModuleHooksForm.php
Gets the names of properties this form should show.
ModuleMiscForm::getFormComponentProperties in src/Form/ModuleMiscForm.php
Gets the names of properties this form should show.
ModuleNameForm::getFormComponentProperties in src/Form/ModuleNameForm.php
Gets the names of properties this form should show.

File

src/Form/ComponentSectionForm.php, line 30

Class

ComponentSectionForm
Generic form for entering a section of data for a component.

Namespace

Drupal\module_builder\Form

Code

protected function getFormComponentProperties(DataItem $data) {

  // Get the list of component properties this section form uses from the
  // handler, which gets them from the entity type annotation.
  $component_entity_type_id = $this->entity
    ->getEntityTypeId();
  $component_sections_handler = $this->entityTypeManager
    ->getHandler($component_entity_type_id, 'component_sections');
  $operation = $this
    ->getOperation();
  $component_properties_to_use = $component_sections_handler
    ->getSectionFormComponentProperties($operation);
  return $component_properties_to_use;
}