public function ServicesClientUserRoleCondition::configForm in Services Client 7.2
Configuration form.
Overrides ServicesClientPlugin::configForm
File
- include/
condition.inc, line 414
Class
Code
public function configForm(&$form, &$form_state) {
$form['roles'] = array(
'#type' => 'select',
'#multiple' => TRUE,
'#title' => t('User Roles'),
'#required' => TRUE,
'#options' => user_roles(),
'#description' => t('All users with such roles will be picked'),
'#default_value' => isset($this->config['roles']) ? $this->config['roles'] : NULL,
);
$form['intersect'] = array(
'#type' => 'checkbox',
'#title' => t('All roles should match?'),
'#description' => t('Otherwise user has to have at least one role.'),
'#default_value' => isset($this->config['intersect']) ? $this->config['intersect'] : NULL,
);
$form['reverse'] = array(
'#type' => 'checkbox',
'#title' => t('Reverse'),
'#description' => t('All users without such roles will be picked.'),
'#default_value' => isset($this->config['reverse']) ? $this->config['reverse'] : NULL,
);
}