You are here

public function FormManglerService::addTcaSettingsToEntityForm in Token Content Access 2.0.x

Same name and namespace in other branches
  1. 8 src/FormManglerService.php \Drupal\tca\FormManglerService::addTcaSettingsToEntityForm()

Form structure for the TCA configuration.

This should be used by other modules that wish to implement the TCA configurations in any form.

Parameters

array $attach: The form that the TCA form should be attached to.

\Drupal\Core\Entity\EntityInterface $entity: The entity that we're adding the form to, e.g. a node. This should be defined even in the case of bundles since it is used to determine bundle and entity type.

string|int|object $form_state: The form state.

string $form_id: The form id.

File

src/FormManglerService.php, line 78

Class

FormManglerService
Class FormManglerService.

Namespace

Drupal\tca

Code

public function addTcaSettingsToEntityForm(array &$attach, EntityInterface $entity, FormStateInterface $form_state, $form_id) {
  $this
    ->addTcaSettingsToForm($attach, $entity
    ->getEntityType()
    ->id(), $entity, $form_state, $form_id);
}