protected function AccessFilterResrictionTestCase::createFilter in Access Filter 7
Create a filter.
Parameters
string $name: A string of filter name.
Return value
object An object of filter.
1 call to AccessFilterResrictionTestCase::createFilter()
- AccessFilterResrictionTestCase::testRestrictionAccess in ./
access_filter.test - Test filter restriction functions.
File
- ./
access_filter.test, line 269 - Tests for access_filter.module
Class
Code
protected function createFilter($name) {
$filter = new stdClass();
$filter->status = 1;
$filter->name = $name;
$filter->deny_action_settings = new stdClass();
$filter->deny_action_settings->type = ACCESS_FILTER_DENY_ACTION_403;
$filter->deny_action_settings->redirect_destination = 'http://drupal.org/';
$filter->deny_action_settings->force_logout = FALSE;
$filter->weight = 1;
return $filter;
}