UNA
Loading...
Searching...
No Matches
BxDolProfile Class Reference
Inheritance diagram for BxDolProfile:
BxDolFactory iBxDolProfile

Public Member Functions

 __clone ()
 
 id ()
 
 getAccountId ($iProfileId=false)
 
 getAccountObject ($iProfileId=false)
 
 getContentId ()
 
 isActive ($iProfileId=false)
 
 isOnline ($iProfileId=false)
 
 isActAsProfile ($iProfileId=false)
 
 getStatus ($iProfileId=false)
 
 getModule ($iProfileId=false)
 
 getInfo ($iProfileId=0)
 
 getDisplayName ($iProfileId=0)
 
 getSettings ($iProfileId=0)
 
 getUrl ($iProfileId=0)
 
 getUnit ($iProfileId=0, $aParams=array())
 
 getUnitAPI ($iProfileId=0, $aParams=array())
 
 getBadges ($iProfileId=0)
 
 hasImage ($iProfileId=0)
 
 getPicture ($iProfileId=0)
 
 getAvatar ($iProfileId=0)
 
 getAvatarBig ($iProfileId=0)
 
 getCover ($iProfileId=0)
 
 getUnitCover ($iProfileId=0)
 
 getThumb ($iProfileId=0)
 
 getIcon ($iProfileId=0)
 
 getIconModule ($iProfileId=0)
 
 getEditUrl ($iProfileId=0)
 
 checkAllowedProfileView ($iProfileId=0)
 
 checkAllowedProfileContact ($iProfileId=0)
 
 checkAllowedPostInProfile ($iProfileId=0, $sPostModule='')
 
 delete ($ID=false, $bDeleteWithContent=false, $bForceDelete=false)
 
 activate ($iAction, $iProfileId=0, $bSendEmailNotification=true)
 
 approve ($iAction, $iProfileId=0, $bSendEmailNotification=true)
 
 disapprove ($iAction, $iProfileId=0, $bSendEmailNotification=true)
 
 move ($iAccountId, $iProfileId=0)
 
 doAudit ($sAction, $aData=array())
 
 suspend ($iAction, $iProfileId=0, $bSendEmailNotification=true)
 
 checkSwitchToProfile ($oTemplate=null, $iViewerAccountId=false, $iViewerProfileId=false)
 
 addInformerPermanentMessages ($oInformer)
 
- Public Member Functions inherited from iBxDolProfile
 getDisplayName ()
 
 getUrl ()
 
 getUnit ()
 
 hasImage ()
 
 getPicture ()
 
 getAvatar ()
 
 getCover ()
 
 getThumb ()
 
 getIcon ()
 
 getIconModule ()
 
 getEditUrl ()
 
 isActive ()
 
 isOnline ()
 
 getStatus ()
 
 getModule ()
 
 checkAllowedProfileView ()
 
 checkAllowedProfileContact ()
 
 checkAllowedPostInProfile ()
 

Static Public Member Functions

static getInstanceAccountProfile ($iAccountId=false, $bClearCache=false)
 
static getInstanceByContentTypeAccount ($iContent, $sType, $iAccountId=false)
 
static getInstanceByContentAndType ($iContent, $sType, $bClearCache=false)
 
static getInstanceByAccount ($iAccountId=false, $bClearCache=false)
 
static getInstanceMagic ($mixedProfileId=false, $bClearCache=false)
 
static getInstance ($mixedProfileId=false, $bClearCache=false)
 
static getData ($mixedProfileId=false, $aParams=[])
 
static getDataForPage ($mixedProfileId=false, $aParams=[])
 
static getID ($s)
 
static add ($iAction, $iAccountId, $iContentId, $sStatus, $sType='system')
 
static getSwitchToProfileRedirectUrl ($iProfileId)
 

Protected Member Functions

 __construct ($iProfileId)
 
 changeStatus ($sStatus, $sAlertActionName, $iAction, $iProfileId=0, $bSendEmailNotification=true)
 

Protected Attributes

 $_iProfileID
 
 $_aProfile
 
 $_oQuery
 

Constructor & Destructor Documentation

◆ __construct()

BxDolProfile::__construct ( $iProfileId)
protected

Constructor

Member Function Documentation

◆ __clone()

BxDolProfile::__clone ( )

Prevent cloning the instance

◆ activate()

BxDolProfile::activate ( $iAction,
$iProfileId = 0,
$bSendEmailNotification = true )

Change profile status to 'Active'

◆ add()

static BxDolProfile::add ( $iAction,
$iAccountId,
$iContentId,
$sStatus,
$sType = 'system' )
static

Insert account and content id association. Also if currect profile id is not defined - it updates current profile id in account.

Parameters
$iAccountIdaccount id
$iContentIdcontent id
$sStatusprofile status
$sTypeprofile content type
Returns
inserted profile's id

Hooks:

'profile', 'add' - hook on profile added

  • $unit_name - equals profile
  • $action - equals add
  • $object_id - profile_id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:
    • module - [string] action id
    • content - [int] content_id in module
    • account - [int] account_id
    • status - [string] status
    • action - [int] action id
    • profile_id - [int] by ref, iprofile_id, can be overridden in hook processing
      HOOKS
      'profile', 'add' - hook on profile added

◆ addInformerPermanentMessages()

BxDolProfile::addInformerPermanentMessages ( $oInformer)

Add permament messages.

◆ approve()

BxDolProfile::approve ( $iAction,
$iProfileId = 0,
$bSendEmailNotification = true )

Change profile status from 'Pending' to the next level - 'Active'

◆ changeStatus()

BxDolProfile::changeStatus ( $sStatus,
$sAlertActionName,
$iAction,
$iProfileId = 0,
$bSendEmailNotification = true )
protected

Hooks:

'profile', 'approve' - hook on switch profile

  • $unit_name - equals profile
  • $action - equals approve
  • $object_id - profile_id for current user
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:
    • action - [int] action id
    • status - [string] by ref, status, can be overridden in hook processing
    • send_email_notification - [bool] by ref, if need to send notification about changed status = true, otherwise false, can be overridden in hook processing
      HOOKS
      'profile', 'approve' - hook on switch profile

◆ checkAllowedPostInProfile()

BxDolProfile::checkAllowedPostInProfile ( $iProfileId = 0,
$sPostModule = '' )

◆ checkAllowedProfileContact()

BxDolProfile::checkAllowedProfileContact ( $iProfileId = 0)

◆ checkAllowedProfileView()

BxDolProfile::checkAllowedProfileView ( $iProfileId = 0)

◆ checkSwitchToProfile()

BxDolProfile::checkSwitchToProfile ( $oTemplate = null,
$iViewerAccountId = false,
$iViewerProfileId = false )

Display informer message if it is possible to switch to this profile

Hooks:

'account', 'check_switch_context' - hook on switch profile

  • $unit_name - equals account
  • $action - equals check_switch_context
  • $object_id - account id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

◆ delete()

BxDolProfile::delete ( $ID = false,
$bDeleteWithContent = false,
$bForceDelete = false )

Delete profile.

Parameters
$ID- optional profile id to delete
$bDeleteWithContent- delete profile with all its contents
$bForceDelete- force deletetion is case of account profile deletion
Returns
false on error, or true on success

Hooks:

'profile', 'before_delete' - hook on before profile deletion

  • $unit_name - equals profile
  • $action - equals before_delete
  • $object_id - profile_id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

Hooks:

'profile', 'delete' - hook on profile deleted

  • $unit_name - equals profile
  • $action - equals delete
  • $object_id - profile_id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

◆ disapprove()

BxDolProfile::disapprove ( $iAction,
$iProfileId = 0,
$bSendEmailNotification = true )

Change profile status to 'Pending'

◆ getAccountId()

BxDolProfile::getAccountId ( $iProfileId = false)

Get account id associated with the profile

◆ getAccountObject()

BxDolProfile::getAccountObject ( $iProfileId = false)

Get account object associated with the profile

◆ getAvatar()

BxDolProfile::getAvatar ( $iProfileId = 0)

Get avatar url

◆ getAvatarBig()

BxDolProfile::getAvatarBig ( $iProfileId = 0)

Get big (2x) avatar url

◆ getBadges()

BxDolProfile::getBadges ( $iProfileId = 0)

Get badges

◆ getContentId()

BxDolProfile::getContentId ( )

Get content id associated with the profile

◆ getCover()

BxDolProfile::getCover ( $iProfileId = 0)

Get cover url

◆ getDisplayName()

BxDolProfile::getDisplayName ( $iProfileId = 0)

Get name to display in thumbnail

Hooks:

'profile', 'profile_name' - hook on before profile deletion

  • $unit_name - equals profile
  • $action - equals profile_name
  • $object_id - profile_id
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:

◆ getEditUrl()

BxDolProfile::getEditUrl ( $iProfileId = 0)

get profile edit page url

◆ getIcon()

BxDolProfile::getIcon ( $iProfileId = 0)

Get icon url

◆ getIconModule()

BxDolProfile::getIconModule ( $iProfileId = 0)

Get module icon

◆ getID()

static BxDolProfile::getID ( $s)
static

Validate profile id.

Parameters
$s- profile id
Returns
profile id or false if profile was not found

◆ getInfo()

BxDolProfile::getInfo ( $iProfileId = 0)

Get profile info

◆ getInstance()

static BxDolProfile::getInstance ( $mixedProfileId = false,
$bClearCache = false )
static

Get singleton instance of Profile by profile id

◆ getInstanceAccountProfile()

static BxDolProfile::getInstanceAccountProfile ( $iAccountId = false,
$bClearCache = false )
static

Get singleton instance of Account Profile by account id

◆ getInstanceByAccount()

static BxDolProfile::getInstanceByAccount ( $iAccountId = false,
$bClearCache = false )
static

Get singleton instance of Profile by Account id (currently active profile is returned)

◆ getInstanceByContentAndType()

static BxDolProfile::getInstanceByContentAndType ( $iContent,
$sType,
$bClearCache = false )
static

Get singleton instance of Profile by content id and type

◆ getInstanceByContentTypeAccount()

static BxDolProfile::getInstanceByContentTypeAccount ( $iContent,
$sType,
$iAccountId = false )
static

Get singleton instance of Profile by account id, content id and type

◆ getInstanceMagic()

static BxDolProfile::getInstanceMagic ( $mixedProfileId = false,
$bClearCache = false )
static

Get singleton instance of Profile by profile id, if profile isn't found it returns instance of BxDolProfileAnonymous or BxDolProfileUndefined

◆ getModule()

BxDolProfile::getModule ( $iProfileId = false)

Get profile module name

◆ getPicture()

BxDolProfile::getPicture ( $iProfileId = 0)

Get picture url

◆ getStatus()

BxDolProfile::getStatus ( $iProfileId = false)

Get profile status

◆ getThumb()

BxDolProfile::getThumb ( $iProfileId = 0)

Get thumbnail url

◆ getUnit()

BxDolProfile::getUnit ( $iProfileId = 0,
$aParams = array() )

Get profile unit

◆ getUnitAPI()

BxDolProfile::getUnitAPI ( $iProfileId = 0,
$aParams = array() )

Get profile unit for API calls

◆ getUnitCover()

BxDolProfile::getUnitCover ( $iProfileId = 0)

Get unit cover url

◆ getUrl()

BxDolProfile::getUrl ( $iProfileId = 0)

Get profile url

◆ hasImage()

BxDolProfile::hasImage ( $iProfileId = 0)

Check whether a profile has real image uploaded by user.

◆ id()

BxDolProfile::id ( )

Get profile id

Implements iBxDolProfile.

◆ isActAsProfile()

BxDolProfile::isActAsProfile ( $iProfileId = false)

Is profile can 'Act as Profile'

◆ isActive()

BxDolProfile::isActive ( $iProfileId = false)

Check if profile status is active

◆ isOnline()

BxDolProfile::isOnline ( $iProfileId = false)

Is profile online

◆ move()

BxDolProfile::move ( $iAccountId,
$iProfileId = 0 )

Move profile to another account

◆ suspend()

BxDolProfile::suspend ( $iAction,
$iProfileId = 0,
$bSendEmailNotification = true )

Change profile status to 'Suspended'


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