ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilUserAutoComplete Class Reference

Auto completion class for user lists. More...

+ Collaboration diagram for ilUserAutoComplete:

Public Member Functions

 __construct ()
 Default constructor.
 setSearchType ($search_type)
 getSearchType ()
 setPrivacyMode ($privacy_mode)
 getPrivacyMode ()
 setUser ($user)
 getUser ()
 enableFieldSearchableCheck ($a_status)
 Enable the check whether the field is searchable in Administration -> Settings -> Standard Fields.
 isFieldSearchableCheckEnabled ()
 Searchable check enabled.
 enableUserAccessCheck ($a_status)
 Enable user access check.
 isUserAccessCheckEnabled ()
 Check if user access check is enabled.
 setSearchFields ($a_fields)
 Set searchable fields.
 getSearchFields ()
 get possible search fields
 setResultField ($a_field)
 Set result field.

Data Fields

const SEARCH_TYPE_LIKE = 1
const SEARCH_TYPE_EQUALS = 2
const PRIVACY_MODE_RESPECT_USER_SETTING = 1
const PRIVACY_MODE_IGNORE_USER_SETTING = 2

Protected Member Functions

 getFields ()
 Get searchable fields.
 getSelectPart ()
 getOrderByPart ()

Private Attributes

 $searchable_check = false
 $user_access_check = true
 $possible_fields = array()
 $result_field
 $search_type
 $privacy_mode
 $user

Detailed Description

Auto completion class for user lists.

Definition at line 7 of file class.ilUserAutoComplete.php.

Constructor & Destructor Documentation

ilUserAutoComplete::__construct ( )

Default constructor.

Definition at line 67 of file class.ilUserAutoComplete.php.

References setPrivacyMode(), and setSearchType().

{
$this->result_field = 'login';
$this->setSearchType(self::SEARCH_TYPE_LIKE);
$this->setPrivacyMode(self::PRIVACY_MODE_IGNORE_USER_SETTING);
}

+ Here is the call graph for this function:

Member Function Documentation

ilUserAutoComplete::enableFieldSearchableCheck (   $a_status)

Enable the check whether the field is searchable in Administration -> Settings -> Standard Fields.

Parameters
bool$a_status

Definition at line 127 of file class.ilUserAutoComplete.php.

{
$this->searchable_check = $a_status;
}
ilUserAutoComplete::enableUserAccessCheck (   $a_status)

Enable user access check.

See Also
Administration -> User Accounts -> Settings -> General Settings
Parameters
bool$a_status

Definition at line 146 of file class.ilUserAutoComplete.php.

{
$this->user_access_check = $a_status;
}
ilUserAutoComplete::getFields ( )
protected

Get searchable fields.

Returns
array

Definition at line 182 of file class.ilUserAutoComplete.php.

References ilUserSearchOptions\_isEnabled(), getSearchFields(), and isFieldSearchableCheckEnabled().

{
{
return $this->getSearchFields();
}
$available_fields = array();
foreach($this->getSearchFields() as $field)
{
include_once 'Services/Search/classes/class.ilUserSearchOptions.php';
{
$available_fields[] = $field;
}
}
return $available_fields;
}

+ Here is the call graph for this function:

ilUserAutoComplete::getOrderByPart ( )
protected
Returns
string

Definition at line 415 of file class.ilUserAutoComplete.php.

{
return 'login ASC';
}
ilUserAutoComplete::getPrivacyMode ( )
Returns
int

Definition at line 102 of file class.ilUserAutoComplete.php.

References $privacy_mode.

Referenced by getSelectPart().

{
}

+ Here is the caller graph for this function:

ilUserAutoComplete::getSearchFields ( )

get possible search fields

Returns
array

Definition at line 173 of file class.ilUserAutoComplete.php.

References $possible_fields.

Referenced by getFields().

+ Here is the caller graph for this function:

ilUserAutoComplete::getSearchType ( )
Returns
mixed

Definition at line 86 of file class.ilUserAutoComplete.php.

References $search_type.

{
}
ilUserAutoComplete::getSelectPart ( )
protected
Returns
string

Definition at line 271 of file class.ilUserAutoComplete.php.

References getPrivacyMode().

{
$fields = array(
'login',
'firstname',
'lastname',
'email'
);
if(self::PRIVACY_MODE_RESPECT_USER_SETTING == $this->getPrivacyMode())
{
$fields[] = 'profpref.value profile_value';
$fields[] = 'pubemail.value email_value';
}
return implode(', ', $fields);
}

+ Here is the call graph for this function:

ilUserAutoComplete::getUser ( )
Returns
ilObjUser

Definition at line 118 of file class.ilUserAutoComplete.php.

References $user.

{
return $this->user;
}
ilUserAutoComplete::isFieldSearchableCheckEnabled ( )

Searchable check enabled.

Returns
bool

Definition at line 136 of file class.ilUserAutoComplete.php.

References $searchable_check.

Referenced by getFields().

+ Here is the caller graph for this function:

ilUserAutoComplete::isUserAccessCheckEnabled ( )

Check if user access check is enabled.

Returns
bool

Definition at line 155 of file class.ilUserAutoComplete.php.

References $user_access_check.

ilUserAutoComplete::setPrivacyMode (   $privacy_mode)
Parameters
int$privacy_mode

Definition at line 94 of file class.ilUserAutoComplete.php.

References $privacy_mode.

Referenced by __construct().

{
$this->privacy_mode = $privacy_mode;
}

+ Here is the caller graph for this function:

ilUserAutoComplete::setResultField (   $a_field)

Set result field.

Parameters
string$a_field

Definition at line 204 of file class.ilUserAutoComplete.php.

{
$this->result_field = $a_field;
}
ilUserAutoComplete::setSearchFields (   $a_fields)

Set searchable fields.

Parameters
array$a_fields

Definition at line 164 of file class.ilUserAutoComplete.php.

{
$this->possible_fields = $a_fields;
}
ilUserAutoComplete::setSearchType (   $search_type)
Parameters
int$search_type

Definition at line 78 of file class.ilUserAutoComplete.php.

References $search_type.

Referenced by __construct().

{
$this->search_type = $search_type;
}

+ Here is the caller graph for this function:

ilUserAutoComplete::setUser (   $user)
Parameters
ilObjUser$user

Definition at line 110 of file class.ilUserAutoComplete.php.

References $user.

{
$this->user = $user;
}

Field Documentation

ilUserAutoComplete::$possible_fields = array()
private

Definition at line 42 of file class.ilUserAutoComplete.php.

Referenced by getSearchFields().

ilUserAutoComplete::$privacy_mode
private

Definition at line 57 of file class.ilUserAutoComplete.php.

Referenced by getPrivacyMode(), and setPrivacyMode().

ilUserAutoComplete::$result_field
private

Definition at line 47 of file class.ilUserAutoComplete.php.

ilUserAutoComplete::$search_type
private

Definition at line 52 of file class.ilUserAutoComplete.php.

Referenced by getSearchType(), and setSearchType().

ilUserAutoComplete::$searchable_check = false
private

Definition at line 32 of file class.ilUserAutoComplete.php.

Referenced by isFieldSearchableCheckEnabled().

ilUserAutoComplete::$user
private

Definition at line 62 of file class.ilUserAutoComplete.php.

Referenced by getUser(), and setUser().

ilUserAutoComplete::$user_access_check = true
private

Definition at line 37 of file class.ilUserAutoComplete.php.

Referenced by isUserAccessCheckEnabled().

const ilUserAutoComplete::PRIVACY_MODE_IGNORE_USER_SETTING = 2

Definition at line 27 of file class.ilUserAutoComplete.php.

const ilUserAutoComplete::PRIVACY_MODE_RESPECT_USER_SETTING = 1

Definition at line 22 of file class.ilUserAutoComplete.php.

const ilUserAutoComplete::SEARCH_TYPE_EQUALS = 2

Definition at line 17 of file class.ilUserAutoComplete.php.

const ilUserAutoComplete::SEARCH_TYPE_LIKE = 1

Definition at line 12 of file class.ilUserAutoComplete.php.


The documentation for this class was generated from the following file: