3 namespace Drupal\inline_entity_form\Form;
5 use Drupal\Core\Form\FormStateInterface;
6 use Drupal\Core\StringTranslation\StringTranslationTrait;
9 * Node inline form handler.
11 class NodeInlineForm extends EntityInlineForm {
13 use StringTranslationTrait;
18 public function getEntityTypeLabels() {
20 'singular' => $this->t('node'),
21 'plural' => $this->t('nodes'),
29 public function getTableFields($bundles) {
30 $fields = parent::getTableFields($bundles);
34 'label' => $this->t('Status'),
36 'display_options' => [
39 'format_custom_false' => $this->t('Unpublished'),
40 'format_custom_true' => $this->t('Published'),
51 public function entityForm(array $entity_form, FormStateInterface $form_state) {
52 $entity_form = parent::entityForm($entity_form, $form_state);
53 // Remove the "Revision log" textarea, it can't be disabled in the
54 // form display and doesn't make sense in the inline form context.
55 $entity_form['revision_log']['#access'] = FALSE;