function views_test_data_handler_test_access_callback_argument

Same name and namespace in other branches
  1. 8.9.x core/modules/views/tests/modules/views_test_data/views_test_data.module \views_test_data_handler_test_access_callback_argument()
  2. 10 core/modules/views/tests/modules/views_test_data/views_test_data.module \views_test_data_handler_test_access_callback_argument()
  3. 11.x core/modules/views/tests/modules/views_test_data/views_test_data.module \views_test_data_handler_test_access_callback_argument()

Access callback with an argument for the generic handler test.

Parameters

bool $argument: A parameter to test that an argument got passed.

Return value

bool Returns views_test_data.tests->handler_access_callback_argument, so the use has access to the handler.

See also

\Drupal\views\Tests\Handler\HandlerTest

1 string reference to 'views_test_data_handler_test_access_callback_argument'
HandlerTest::viewsData in core/modules/views/tests/src/Functional/Handler/HandlerTest.php
Returns the views data definition.

File

core/modules/views/tests/modules/views_test_data/views_test_data.module, line 36

Code

function views_test_data_handler_test_access_callback_argument($argument = FALSE) {
    // Check the argument to be sure that access arguments are passed into the
    // callback.
    if ($argument) {
        return \Drupal::config('views_test_data.tests')->get('handler_access_callback_argument');
    }
    else {
        return FALSE;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.