/**
  * @return Editor_Forms_SearchOptions
  */
 protected function buildUserInteraction()
 {
     $modelUsers = new OpenSKOS_Db_Table_Users();
     $users = $modelUsers->fetchAll($modelUsers->select()->where('tenant=?', $this->_getCurrentTenant()->code));
     $roles = OpenSKOS_Db_Table_Users::getUserRoles();
     $rolesOptions = array_combine($roles, $roles);
     $userData = array();
     foreach ($users as $user) {
         $userData[$user->id] = $user->name;
     }
     $userInteractionTypes = array();
     if (isset($this->_searchOptions['interactiontypes'])) {
         $userInteractionTypes = $this->_searchOptions['interactiontypes'];
     }
     $this->addElement('hidden', 'userInteractionTypeLabel', array('label' => _('Created, modified or approved'), 'disabled' => true));
     $this->addElement('multiCheckbox', 'userInteractionType', array('label' => '', 'multiOptions' => $userInteractionTypes));
     $this->addElement('multiselect', 'interactionByRoles', array('label' => _('Roles'), 'multiOptions' => $rolesOptions));
     $this->addElement('multiselect', 'interactionByUsers', array('label' => _('Users'), 'multiOptions' => $userData));
     $this->buildDateInput('interaction');
     $this->addDisplayGroup(array('userInteractionType', 'interactionByRoles', 'interactionByUsers', 'interactionDateFrom', 'interactionDateTo'), 'interaction', array('legend' => _('Created, modified or approved'), 'disableDefaultDecorators' => true, 'decorators' => array('FormElements', array('HtmlTag', array('tag' => 'div', 'id' => 'interaction')))));
     return $this;
 }