API - XOOPS 2.5.11 Beta 2
By monxoops.fr
ProfileVisibilityHandler Class Reference
Inheritance diagram for ProfileVisibilityHandler:
Collaboration diagram for ProfileVisibilityHandler:

Public Member Functions

 __construct (XoopsDatabase $db)
 
 getVisibleFields ($profile_groups, $user_groups=null)
 
 getAllByFieldId (CriteriaElement $criteria=null)
 
- Public Member Functions inherited from XoopsPersistableObjectHandler
 __construct (XoopsDatabase $db=null, $table='', $className='', $keyName='', $identifierName='')
 
 XoopsPersistableObjectHandler (XoopsDatabase $db=null, $table='', $className='', $keyName='', $identifierName='')
 
 setHandler ($handler=null, $args=null, $path=null)
 
 loadHandler ($name, $args=null)
 
 __call ($name, $args)
 
 create ($isNew=true)
 
 get ($id=null, $fields=null)
 
 insert (XoopsObject $object, $force=true)
 
 delete (XoopsObject $object, $force=false)
 
 deleteAll (CriteriaElement $criteria=null, $force=true, $asObject=false)
 
 updateAll ($fieldname, $fieldvalue, CriteriaElement $criteria=null, $force=false)
 
getObjects (CriteriaElement $criteria=null, $id_as_key=false, $as_object=true)
 
getAll (CriteriaElement $criteria=null, $fields=null, $asObject=true, $id_as_key=true)
 
 getList (CriteriaElement $criteria=null, $limit=0, $start=0)
 
getIds (CriteriaElement $criteria=null)
 
getByLimit ($limit=0, $start=0, CriteriaElement $criteria=null, $fields=null, $asObject=true)
 
 getCount (CriteriaElement $criteria=null)
 
 getCounts (CriteriaElement $criteria=null)
 
getByLink (CriteriaElement $criteria=null, $fields=null, $asObject=true, $field_link=null, $field_object=null)
 
 getCountByLink (CriteriaElement $criteria=null)
 
 getCountsByLink (CriteriaElement $criteria=null)
 
 updateByLink ($data, CriteriaElement $criteria=null)
 
 deleteByLink (CriteriaElement $criteria=null)
 
 cleanOrphan ($table_link='', $field_link='', $field_object='')
 
 synchronization ()
 
 convertResultSet ($result, $id_as_key=false, $as_object=true)
 
- Public Member Functions inherited from XoopsObjectHandler
 __construct (XoopsDatabase $db)
 
 XoopsObjectHandler ($db)
 
 create ()
 
 get ($id)
 
 insert (XoopsObject $object)
 
 delete (XoopsObject $object)
 

Protected Member Functions

 visibilitySort ($a, $b)
 

Additional Inherited Members

- Data Fields inherited from XoopsPersistableObjectHandler
 $handler
 
 $handlers = array('read' => null, 'stats' => null, 'joint' => null, 'write' => null, 'sync' => null)
 
 $table
 
 $keyName
 
 $className
 
 $identifierName
 
 $field_link
 
 $field_object
 
- Data Fields inherited from XoopsObjectHandler
 $db
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

__construct ( XoopsDatabase  $db)
Parameters
null | XoopsDatabase$db

Reimplemented from XoopsObjectHandler.

Member Function Documentation

◆ getAllByFieldId()

getAllByFieldId ( CriteriaElement  $criteria = null)

get all rows matching a condition

Parameters
CriteriaElement$criteriaCriteriaElement to match
Returns
array of row arrays, indexed by field_id

◆ getVisibleFields()

getVisibleFields (   $profile_groups,
  $user_groups = null 
)

Get fields visible to the $user_groups on a $profile_groups profile

Parameters
array$profile_groupsgroups of the user to be accessed
array$user_groupsgroups of the visitor, default as $GLOBALS['xoopsUser']
Returns
array

◆ visibilitySort()

visibilitySort (   $a,
  $b 
)
protected

compare two arrays, each a row from profile_visibility The comparison is on three columns, 'field_id', 'user_group', 'profile_group' considered in that order for comparison

Parameters
array$aassociative array with 3 numeric entries 'field_id', 'user_group', 'profile_group'
array$bassociative array with 3 numeric entries 'field_id', 'user_group', 'profile_group'
Returns
int integer less that zero if $a is less than $b integer zero if $a and $b are equal integer greater than zero if $a is greater than $b

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