quiz_maker-1.0.6/src/Form/InlineQuestionForm.php
src/Form/InlineQuestionForm.php
<?php
namespace Drupal\quiz_maker\Form;
use Drupal\Core\Form\FormStateInterface;
use Drupal\inline_entity_form\Form\EntityInlineForm;
/**
* Inline form for question entity.
*/
class InlineQuestionForm extends EntityInlineForm {
/**
* {@inheritdoc}
*/
public function entityForm(array $entity_form, FormStateInterface $form_state) {
$form = parent::entityForm($entity_form, $form_state);
return $form;
}
/**
* {@inheritdoc}
*/
public function getTableFields($bundles) {
$fields = parent::getTableFields($bundles);
$fields['status'] = [
'type' => 'field',
'label' => $this->t('Status'),
'weight' => 3,
];
return $fields;
}
/**
* {@inheritdoc}
*/
public function isTableDragEnabled($element) {
return TRUE;
}
}
