18.10.2016 Views

Drupal 7 Module Development

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Drupal</strong> Permissions and Security<br />

The form presented to the end user contains no information about the item to be<br />

deleted. That data is passed behind the scenes.<br />

The form, as displayed to the browser, only contains the data that <strong>Drupal</strong> needs to<br />

validate the form and extract the data from its cache:<br />

<br />

<br />

This action cannot be undone.<br />

<br />

<br />

<br />

<br />

Cancel<br />

<br />

<br />

<br />

<br />

<br />

<br />

The submit handler for the form picks up the data value for processing:<br />

/**<br />

* Remove all items from a feed and redirect to the overview page.<br />

*<br />

* @param $feed<br />

* An associative array describing the feed to be cleared.<br />

*/<br />

function aggregator_admin_remove_feed_submit($form, &$form_state) {<br />

aggregator_remove($form_state['values']['feed']);<br />

$form_state['redirect'] = 'admin/config/services/aggregator';<br />

}<br />

[ 232 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!