protected static function RestfulDataProviderCToolsPlugins::isValidConjunctionForFilter in RESTful 7
Overrides \RestfulBase::isValidConjuctionForFilter().
Overrides RestfulBase::isValidConjunctionForFilter
File
- plugins/
restful/ RestfulDataProviderCToolsPlugins.php, line 116 - Contains \RestfulDataProviderCToolsPlugins
Class
Code
protected static function isValidConjunctionForFilter($conjunction) {
$allowed_conjunctions = array(
'AND',
'OR',
);
if (!in_array(strtoupper($conjunction), $allowed_conjunctions)) {
throw new \RestfulBadRequestException(format_string('Conjunction "@conjunction" is not allowed for filtering on this resource. Allowed conjunctions are: !allowed', array(
'@conjunction' => $conjunction,
'!allowed' => implode(', ', $allowed_conjunctions),
)));
}
}