public function ImageStyleFormBase::form in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/image/src/Form/ImageStyleFormBase.php \Drupal\image\Form\ImageStyleFormBase::form()
Gets the actual form array to be built.
Overrides EntityForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
1 call to ImageStyleFormBase::form()
- ImageStyleEditForm::form in core/
modules/ image/ src/ Form/ ImageStyleEditForm.php - Gets the actual form array to be built.
1 method overrides ImageStyleFormBase::form()
- ImageStyleEditForm::form in core/
modules/ image/ src/ Form/ ImageStyleEditForm.php - Gets the actual form array to be built.
File
- core/
modules/ image/ src/ Form/ ImageStyleFormBase.php, line 56 - Contains \Drupal\image\Form\ImageStyleFormBase.
Class
- ImageStyleFormBase
- Base form for image style add and edit forms.
Namespace
Drupal\image\FormCode
public function form(array $form, FormStateInterface $form_state) {
$form['label'] = array(
'#type' => 'textfield',
'#title' => $this
->t('Image style name'),
'#default_value' => $this->entity
->label(),
'#required' => TRUE,
);
$form['name'] = array(
'#type' => 'machine_name',
'#machine_name' => array(
'exists' => array(
$this->imageStyleStorage,
'load',
),
),
'#default_value' => $this->entity
->id(),
'#required' => TRUE,
);
return parent::form($form, $form_state);
}