function og_views_plugin_argument_validate_og_group_types::validate_group_node_type in Organic groups 6.2
Validate whether or not the specified node type is configured to be a valid group node type for the purposes of this view. The view can be configured to accept all group node types or a subset of group node types.
Parameters
string $type: The node type that is being validated.
Return value
boolean
1 call to og_views_plugin_argument_validate_og_group_types::validate_group_node_type()
- og_views_plugin_argument_validate_og_group_types::validate_argument in modules/
og_views/ includes/ og_views_plugin_argument_validate_og_group_types.inc
File
- modules/
og_views/ includes/ og_views_plugin_argument_validate_og_group_types.inc, line 168
Class
- og_views_plugin_argument_validate_og_group_types
- Validate whether an argument is a group node.
Code
function validate_group_node_type($type) {
$types = array();
if (!empty($this->argument->options['validate_argument_group_node_type'])) {
$types = array_filter($this->argument->options['validate_argument_group_node_type']);
}
if (empty($types)) {
return og_is_group_type($type);
}
else {
return isset($types[$type]);
}
}