Expanded class hierarchy of PictureMappingActionConfirmForm
class PictureMappingActionConfirmForm extends ConfirmFormBase {
/**
* The picture mapping object to be deleted.
*
* @var type \Drupal\Core\Entity\EntityInterface
*/
protected $pictureMapping;
/**
* {@inheritdoc}
*/
protected function getQuestion() {
return t('Are you sure you want to delete the picture_mapping %title?', array(
'%title' => $this->pictureMapping
->label(),
));
}
/**
* {@inheritdoc}
*/
protected function getCancelPath() {
return 'admin/config/media/picturemapping';
}
/**
* {@inheritdoc}
*/
protected function getConfirmText() {
return t('Delete');
}
/**
* {@inheritdoc}
*/
public function getFormID() {
return 'picture_mapping_action_confirm';
}
/**
* {@inheritdoc}
*/
public function buildForm(array $form, array &$form_state, EntityInterface $picture_mapping = NULL) {
$this->pictureMapping = $picture_mapping;
return parent::buildForm($form, $form_state);
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, array &$form_state) {
$this->pictureMapping
->delete();
drupal_set_message(t('Picture mapping %label has been deleted.', array(
'%label' => $this->pictureMapping
->label(),
)));
watchdog('picture', 'Picture mapping %label has been deleted.', array(
'%label' => $this->pictureMapping
->label(),
), WATCHDOG_NOTICE);
$form_state['redirect'] = 'admin/config/media/picturemapping';
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfirmFormBase:: |
protected | function | Returns a caption for the link which cancels the action. | 2 |
ConfirmFormBase:: |
protected | function | Returns additional text to display as a description. | 10 |
ConfirmFormBase:: |
protected | function | Returns the internal name used to refer to the confirmation item. | |
ConfirmFormBase:: |
public | function |
Implements \Drupal\Core\Form\FormInterface::validateForm(). Overrides FormInterface:: |
1 |
PictureMappingActionConfirmForm:: |
protected | property | The picture mapping object to be deleted. | |
PictureMappingActionConfirmForm:: |
public | function |
Implements \Drupal\Core\Form\FormInterface::buildForm(). Overrides ConfirmFormBase:: |
|
PictureMappingActionConfirmForm:: |
protected | function |
Returns the page to go to if the user cancels the action. Overrides ConfirmFormBase:: |
|
PictureMappingActionConfirmForm:: |
protected | function |
Returns a caption for the button that confirms the action. Overrides ConfirmFormBase:: |
|
PictureMappingActionConfirmForm:: |
public | function |
Returns a unique string identifying the form. Overrides FormInterface:: |
|
PictureMappingActionConfirmForm:: |
protected | function |
Returns the question to ask the user. Overrides ConfirmFormBase:: |
|
PictureMappingActionConfirmForm:: |
public | function |
Form submission handler. Overrides FormInterface:: |