function NodeDisplaysRegions::_nd_field_not_found in Node displays 7
Same name and namespace in other branches
- 6.3 tests/nd.regions.test \NodeDisplaysRegions::_nd_field_not_found()
- 6 tests/nd.regions.test \NodeDisplaysRegions::_nd_field_not_found()
- 6.2 tests/nd.regions.test \NodeDisplaysRegions::_nd_field_not_found()
Helper function to determine if a field is in a region. Returns true if not found.
Parameters
string $search The field to search for in the regions.:
array $regions A list of regions.:
1 call to NodeDisplaysRegions::_nd_field_not_found()
- NodeDisplaysRegions::testRendering in tests/
nd.regions.test - Test if nodeapi & preprocess do their job good by excluding fields and putting them in the right region.
File
- tests/
nd.regions.test, line 32 - Tests for Node displays (regions)
Class
- NodeDisplaysRegions
- @file Tests for Node displays (regions)
Code
function _nd_field_not_found($search, $regions) {
foreach ($regions as $region) {
foreach ($region as $field => $weight) {
if ($field == $search) {
return FALSE;
}
}
}
return TRUE;
}