ILIAS  Release_5_0_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.
 setLimit ($a_limit)
 getLimit ()
 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.
 isMoreLinkAvailable ()
 setMoreLinkAvailable ($more_link_available)
 IMPORTANT: remember to read request parameter 'fetchall' to use this function.

Data Fields

const MAX_ENTRIES = 1000
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
 $limit = 0
 $more_link_available = false

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 78 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 148 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 167 of file class.ilUserAutoComplete.php.

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

Get searchable fields.

Returns
array

Definition at line 203 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::getLimit ( )

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

References $limit.

{
return $this->limit;
}
ilUserAutoComplete::getOrderByPart ( )
protected
Returns
string

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

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

Definition at line 123 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 194 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 107 of file class.ilUserAutoComplete.php.

References $search_type.

{
}
ilUserAutoComplete::getSelectPart ( )
protected
Returns
string

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

References getPrivacyMode().

{
$fields = array(
'ud.usr_id',
'ud.login',
'ud.firstname',
'ud.lastname',
'ud.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 139 of file class.ilUserAutoComplete.php.

References $user.

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

Searchable check enabled.

Returns
bool

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

References $searchable_check.

Referenced by getFields().

+ Here is the caller graph for this function:

ilUserAutoComplete::isMoreLinkAvailable ( )
Returns
boolean

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

References $more_link_available.

ilUserAutoComplete::isUserAccessCheckEnabled ( )

Check if user access check is enabled.

Returns
bool

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

References $user_access_check.

ilUserAutoComplete::setLimit (   $a_limit)

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

{
$this->limit = $a_limit;
}
ilUserAutoComplete::setMoreLinkAvailable (   $more_link_available)

IMPORTANT: remember to read request parameter 'fetchall' to use this function.

Parameters
boolean$more_link_available

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

References $more_link_available.

{
$this->more_link_available = $more_link_available;
}
ilUserAutoComplete::setPrivacyMode (   $privacy_mode)
Parameters
int$privacy_mode

Definition at line 115 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 225 of file class.ilUserAutoComplete.php.

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

Set searchable fields.

Parameters
array$a_fields

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

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

Definition at line 99 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 131 of file class.ilUserAutoComplete.php.

References $user.

{
$this->user = $user;
}

Field Documentation

ilUserAutoComplete::$limit = 0
private

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

Referenced by getLimit().

ilUserAutoComplete::$more_link_available = false
private

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

Referenced by isMoreLinkAvailable(), and setMoreLinkAvailable().

ilUserAutoComplete::$possible_fields = array()
private

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

Referenced by getSearchFields().

ilUserAutoComplete::$privacy_mode
private

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

Referenced by getPrivacyMode(), and setPrivacyMode().

ilUserAutoComplete::$result_field
private

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

ilUserAutoComplete::$search_type
private

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

Referenced by getSearchType(), and setSearchType().

ilUserAutoComplete::$searchable_check = false
private

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

Referenced by isFieldSearchableCheckEnabled().

ilUserAutoComplete::$user
private

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

Referenced by getUser(), and setUser().

ilUserAutoComplete::$user_access_check = true
private

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

Referenced by isUserAccessCheckEnabled().

const ilUserAutoComplete::PRIVACY_MODE_IGNORE_USER_SETTING = 2

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

const ilUserAutoComplete::PRIVACY_MODE_RESPECT_USER_SETTING = 1

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

const ilUserAutoComplete::SEARCH_TYPE_EQUALS = 2

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

const ilUserAutoComplete::SEARCH_TYPE_LIKE = 1

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


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