public function MiconForm::updateStatus in Micon 8
Same name and namespace in other branches
- 2.x src/Form/MiconForm.php \Drupal\micon\Form\MiconForm::updateStatus()
Entity builder updating the micon status with the submitted value.
Parameters
string $entity_type_id: The entity type identifier.
\Drupal\micon\MiconInterface $micon: The micon updated with the submitted values.
array $form: The complete form array.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
See also
\Drupal\micon\MiconForm::form()
File
- src/
Form/ MiconForm.php, line 84
Class
- MiconForm
- Class MiconForm.
Namespace
Drupal\micon\FormCode
public function updateStatus($entity_type_id, MiconInterface $micon, array $form, FormStateInterface $form_state) {
$element = $form_state
->getTriggeringElement();
if (isset($element['#published_status'])) {
$micon
->setStatus($element['#published_status']);
}
}