public function TypeGroupForm::updateStatus in Booking and Availability Management Tools for Drupal 8
Entity builder updating the type group status with the submitted value.
Parameters
string $entity_type_id: The entity type identifier.
\Drupal\bat\TypeGroupInterface $type_group: The type group updated with the submitted values.
array $form: The complete form array.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
File
- src/
Entity/ Form/ TypeGroupForm.php, line 222 - Contains \Drupal\bat\Entity\Form\TypeGroupForm.
Class
- TypeGroupForm
- Form controller for Type Group edit forms.
Namespace
Drupal\bat\Entity\FormCode
public function updateStatus($entity_type_id, TypeGroupInterface $type_group, array $form, FormStateInterface $form_state) {
$element = $form_state
->getTriggeringElement();
if (isset($element['#published_status'])) {
$type_group
->setStatus($element['#published_status']);
}
}