public function BlockContentInlineBlockTranslateForm::form in Layout Builder Symmetric Translations 8
Gets the actual form array to be built.
Overrides BlockContentForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
File
- src/
Form/ BlockContentInlineBlockTranslateForm.php, line 132
Class
- BlockContentInlineBlockTranslateForm
- Provides a form class for translating inline blocks in the Layout Builder.
Namespace
Drupal\layout_builder_st\FormCode
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
// The language of the translation cannot be changed.
$form['langcode']['#access'] = FALSE;
$form['revision_log']['#access'] = FALSE;
// Creating new revisions is based on the entity with the layout.
$form['revision']['#access'] = FALSE;
return $form;
}