Drupal 8  8.0.2
EntityConfirmFormBase Class Reference
Inheritance diagram for EntityConfirmFormBase:

Public Member Functions

 getBaseFormId ()
 
 getDescription ()
 
 getConfirmText ()
 
 getCancelText ()
 
 getFormName ()
 
 buildForm (array $form, FormStateInterface $form_state)
 
 save (array $form, FormStateInterface $form_state)
 
 delete (array $form, FormStateInterface $form_state)
 
- Public Member Functions inherited from EntityForm
 setOperation ($operation)
 
 getBaseFormId ()
 
 getFormId ()
 
 buildForm (array $form, FormStateInterface $form_state)
 
 form (array $form, FormStateInterface $form_state)
 
 processForm ($element, FormStateInterface $form_state, $form)
 
 afterBuild (array $element, FormStateInterface $form_state)
 
 submitForm (array &$form, FormStateInterface $form_state)
 
 save (array $form, FormStateInterface $form_state)
 
 buildEntity (array $form, FormStateInterface $form_state)
 
 getEntity ()
 
 setEntity (EntityInterface $entity)
 
 getEntityFromRouteMatch (RouteMatchInterface $route_match, $entity_type_id)
 
 getOperation ()
 
 setModuleHandler (ModuleHandlerInterface $module_handler)
 
 setEntityManager (EntityManagerInterface $entity_manager)
 
 setEntityTypeManager (EntityTypeManagerInterface $entity_type_manager)
 
- Public Member Functions inherited from EntityFormInterface
 setStringTranslation (TranslationInterface $string_translation)
 
- Public Member Functions inherited from FormInterface
 validateForm (array &$form, FormStateInterface $form_state)
 
- Public Member Functions inherited from ConfirmFormInterface
 getQuestion ()
 
 getCancelUrl ()
 

Protected Member Functions

 actions (array $form, FormStateInterface $form_state)
 
- Protected Member Functions inherited from EntityForm
 init (FormStateInterface $form_state)
 
 actionsElement (array $form, FormStateInterface $form_state)
 
 actions (array $form, FormStateInterface $form_state)
 
 copyFormValuesToEntity (EntityInterface $entity, array $form, FormStateInterface $form_state)
 
 prepareEntity ()
 
 prepareInvokeAll ($hook, FormStateInterface $form_state)
 

Additional Inherited Members

- Protected Attributes inherited from EntityForm
 $operation
 
 $moduleHandler
 
 $entityManager
 
 $entityTypeManager
 
 $entity
 

Detailed Description

Provides a generic base class for an entity-based confirmation form.

Member Function Documentation

actions ( array  $form,
FormStateInterface  $form_state 
)
protected

{}

References ConfirmFormHelper\buildCancelLink(), and EntityConfirmFormBase\getConfirmText().

Here is the call graph for this function:

buildForm ( array  $form,
FormStateInterface  $form_state 
)

{Form constructor.

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
Returns
array The form structure.
}

Implements FormInterface.

References EntityConfirmFormBase\getDescription(), EntityConfirmFormBase\getFormName(), and ConfirmFormInterface\getQuestion().

Here is the call graph for this function:

delete ( array  $form,
FormStateInterface  $form_state 
)

{}

The delete() method is not used in EntityConfirmFormBase. This overrides the default implementation that redirects to the delete-form confirmation form.

Confirmation forms should override submitForm() instead for their logic.

getBaseFormId ( )

{Returns a string identifying the base form.

Returns
string|null The string identifying the base form or NULL if this is not a base form.
}

Implements BaseFormIdInterface.

getCancelText ( )

{Returns a caption for the link which cancels the action.

Returns
string The form cancellation text.
}

Implements ConfirmFormInterface.

References t().

Here is the call graph for this function:

getConfirmText ( )

{Returns a caption for the button that confirms the action.

Returns
string The form confirmation text.
}

Implements ConfirmFormInterface.

References t().

Referenced by EntityConfirmFormBase\actions().

Here is the call graph for this function:

Here is the caller graph for this function:

getDescription ( )

{Returns additional text to display as a description.

Returns
string The form description.
}

Implements ConfirmFormInterface.

References t().

Referenced by EntityConfirmFormBase\buildForm().

Here is the call graph for this function:

Here is the caller graph for this function:

getFormName ( )

{Returns the internal name used to refer to the confirmation item.

Returns
string The internal form name.
}

Implements ConfirmFormInterface.

Referenced by EntityConfirmFormBase\buildForm().

Here is the caller graph for this function:

save ( array  $form,
FormStateInterface  $form_state 
)

{Form submission handler for the 'save' action.Normally this method should be overridden to provide specific messages to the user and redirect the form after the entity has been saved.

Parameters
array$formAn associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface$form_stateThe current state of the form.
Returns
int Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed.
}

The save() method is not used in EntityConfirmFormBase. This overrides the default implementation that saves the entity.

Confirmation forms should override submitForm() instead for their logic.

Implements EntityFormInterface.


The documentation for this class was generated from the following file: