BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
BlueSpice\Social\Entity Class Reference
Inheritance diagram for BlueSpice\Social\Entity:
Collaboration diagram for BlueSpice\Social\Entity:

Public Member Functions

 getConfig ()
 
 getOwnerID ()
 
 getOwner ()
 
 getOwnerName ()
 
 getOwnerRealName ()
 
 getTimestampTouched ()
 
 getTimestampCreated ()
 
 getHeaderMessageKey ()
 
 getHeader ($oMsg=null)
 
 save (\User $oUser=null, $aOptions=array())
 
 delete (\User $oUser=null, $aOptions=array())
 
 deleteChildren (\User $oUser)
 
 getFullData ($a=array())
 
 getChildren ($aOptions=array(), $aFilters=array(), $bForceReload=false, $bCheckPermission=true)
 
 getAttachments ($bForceInvalidateFirst=false)
 
 hasParent ()
 
 getParent ()
 
 getParentID ()
 
 setParentID ($iID)
 
 setValuesByObject (\stdClass $o)
 
 render ($sType= 'Default', $bNoCache=false)
 
 getOutput ()
 
 getRelatedTitle ()
 
 getVarMessage ($sVarName)
 
 userCan ($sAction= 'read',\User $oUser=null)
 
 getActions (array $aActions=[],\User $oUser=null)
 
 invalidateCache ()
 
- Public Member Functions inherited from BlueSpice\Entity
 getConfig ()
 
 getTitle ()
 
 getTimestampTouched ()
 
 getTimestampCreated ()
 
 save (\User $oUser=null, $aOptions=[])
 
 delete (\User $oUser=null, $aOptions=[])
 
 getFullData ($aData=array())
 
 exists ()
 
 isArchived ()
 
 hasUnsavedChanges ()
 
 getID ()
 
 getOwnerID ()
 
 getType ()
 
 setUnsavedChanges ($bStatus=true)
 
 setOwnerID ($iOwnerID)
 
 toJson ()
 
 jsonSerialize ()
 
 setValuesByObject (\stdClass $oData)
 
 userIsOwner (\User $oUser)
 
 invalidateCache ()
 

Public Attributes

const NS = NS_BSSOCIAL
 
- Public Attributes inherited from BlueSpice\Entity
const NS = -1
 
const ATTR_TYPE = 'type'
 
const ATTR_ID = 'id'
 
const ATTR_OWNER_ID = 'ownerid'
 
const ATTR_ARCHIVED = 'archived'
 
const ATTR_PARENT_ID = 'parentid'
 
const ATTR_TIMESTAMP_CREATED = 'timestampcreated'
 
const ATTR_TIMESTAMP_TOUCHED = 'timestamptouched'
 

Protected Member Functions

 getChildrenFromIndex ()
 
 checkPermission ($sAction,\User $oUser,\Title $oTitle=null)
 
- Protected Member Functions inherited from BlueSpice\Entity
 __construct (\stdClass $oStdClass, EntityConfig $oConfig, EntityFactory $entityFactory=null)
 
 invalidateTitleCache ($purgeTime=null)
 

Protected Attributes

 $aChildren = null
 
 $oOutput = null
 
 $iParentID = 0
 
- Protected Attributes inherited from BlueSpice\Entity
 $entityFactory = null
 
 $bUnsavedChanges = true
 
 $oConfig = null
 
 $iID = 0
 
 $iOwnerID = 0
 
 $sType = ''
 
 $bArchived = false
 

Additional Inherited Members

- Static Public Member Functions inherited from BlueSpice\Entity
static newFromFactory (\stdClass $data, EntityConfig $oConfig, EntityFactory $entityFactory)
 
static newFromContent (EntityContent $sContent)
 
static newFromObject ($oObject)
 
static getTitleFor ($iID)
 
static newFromID ($iID, $bForceReload=false)
 
static newFromTitle (\Title $oTitle, $bForceReload=false)
 

Member Function Documentation

BlueSpice\Social\Entity::delete ( \User  $oUser = null,
  $aOptions = array() 
)

Deletes the current BSSocialEntity

Returns
Status
BlueSpice\Social\Entity::deleteChildren ( \User  $oUser)

Deletes all children of the current BSSocialEntity

Returns
Status
BlueSpice\Social\Entity::getActions ( array  $aActions = [],
\User  $oUser = null 
)

Returns an array of actions, the given user can do on the Entity

Parameters
array$aActions
\User$oUser
Returns
array
BlueSpice\Social\Entity::getAttachments (   $bForceInvalidateFirst = false)

Returns the attachments as an array

Parameters
boolean$bForceInvalidateFirst
Returns
array
BlueSpice\Social\Entity::getChildren (   $aOptions = array(),
  $aFilters = array(),
  $bForceReload = false,
  $bCheckPermission = true 
)

Returns an array of the entitys children

Returns
array
BlueSpice\Social\Entity::getConfig ( )

Gets the related config object

Returns
EntityConfig
BlueSpice\Social\Entity::getFullData (   $a = array())

Gets the BSSocialEntity attributes formated for the api

Returns
object
BlueSpice\Social\Entity::getHeader (   $oMsg = null)

Returns the Message object for the entity header

Parameters
Message$oMsg
Returns
Message
BlueSpice\Social\Entity::getHeaderMessageKey ( )

Returns the Message Key for the entity header

Returns
string
BlueSpice\Social\Entity::getOutput ( )
Returns
BSSocialEntityOutput
BlueSpice\Social\Entity::getOwner ( )
Returns
BlueSpice\Social\Entity::getOwnerID ( )

Returns the id of the owner or the current user id when the Entity does not exist yet

Returns
int
BlueSpice\Social\Entity::getOwnerName ( )

Returns the owners username

Returns
string
BlueSpice\Social\Entity::getOwnerRealName ( )

Returns the owners real name or the username if empty

Returns
string
BlueSpice\Social\Entity::getParent ( )

Returns the parent entity or null, if there is non

Returns
BSSocialEntity | null
BlueSpice\Social\Entity::getParentID ( )

Returns the parent ID

Returns
integer
BlueSpice\Social\Entity::getVarMessage (   $sVarName)
Parameters
sring$sVarName
Returns
Message
BlueSpice\Social\Entity::hasParent ( )

Checks if the entity has a parent entity

Returns
boolean
BlueSpice\Social\Entity::invalidateCache ( )

Invalidated the cache

Returns
Entity
BlueSpice\Social\Entity::render (   $sType = 'Default',
  $bNoCache = false 
)

Return the Entity as HTML

Parameters
string$sType
boolean$bNoCache
Returns
string
BlueSpice\Social\Entity::save ( \User  $oUser = null,
  $aOptions = array() 
)

Saves the current BSSocialEntity

Returns
Status
BlueSpice\Social\Entity::setParentID (   $iID)

Sets the parent ID

Parameters
int
Returns
BSSocialEntity
BlueSpice\Social\Entity::userCan (   $sAction = 'read',
\User  $oUser = null 
)
Parameters
\User$oUser
Returns

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