FlagEditForm.php in Flag 8.4
File
src/Form/FlagEditForm.php
View source
<?php
namespace Drupal\flag\Form;
use Drupal\Core\Form\FormStateInterface;
class FlagEditForm extends FlagFormBase {
public function buildForm(array $form, FormStateInterface $form_state, $entity_type = NULL) {
$form = parent::buildForm($form, $form_state);
$form['global']['#disabled'] = TRUE;
$form['global']['#description'] = $this
->t('The scope cannot be changed on existing flags.');
return $form;
}
protected function actions(array $form, FormStateInterface $form_state) {
$actions = parent::actions($form, $form_state);
$actions['submit']['#value'] = $this
->t('Save Flag');
return $actions;
}
}