CSPortalObject
in package
Abstract base class of CSPortalTabs, CSPortalPortals and CSPortalWidgets
Tags
Table of Contents
- SHARING_TYPE_INSERTABLE = 2
- SHARING_TYPE_NONE = 0
- SHARING_TYPE_VISIBLE = 1
- SHARING_TYPE_VISIBLE_AND_INSERTABLE = 3
- $sharingFilterType : mixed
- __construct() : CSPortalObject
- Construct CSPortalObject instance.
- applySharingToSubElements() : void
- Transpose sharing to Object's children
- copyToOwner() : CSPortalObject
- Copies the object to a given owner
- delete() : void
- Deletes the object from the database Adds a log entry of its deletion.
- getCreationDate() : string
- Get creation date of object
- getCreator() : string
- Get the user name of the Object's creator
- getID() : int
- Retrieve Record ID of current Object
- getMetaDescription() : string
- Get meta description of current Object
- getMetaKeywords() : string
- Get the meta keywords for current Object
- getModuleForTranslation() : string
- Returns a module name for which the translation should be retrieved Default: "portal"
- getOwnerID() : int
- Get UserID of current Owner
- getRubrics() : array<string|int, mixed>
- Get the rubrics set for current Object
- getSharingType() : int
- Check if current Object is shared
- getTitle() : string
- Get the title of the Object
- setID() : void
- Set the ID of the Object
- setMetaDescription() : void
- Set the meta description of current Object
- setMetaKeywords() : void
- Set meta keywords describing current Object
- setOwnerID() : void
- Sets the OnwerID of the object
- setParentID() : void
- Move Object to another parent Object.
- setRubrics() : mixed
- Set the Rubrics for current Object with ID list of ItemRubric Records
- setSharingType() : void
- Set object sharing
- setTitle() : void
- Set the title of the Object
- store() : void
- Store current object to database
Constants
SHARING_TYPE_INSERTABLE
public
mixed
SHARING_TYPE_INSERTABLE
= 2
Tags
SHARING_TYPE_NONE
public
mixed
SHARING_TYPE_NONE
= 0
Tags
SHARING_TYPE_VISIBLE
public
mixed
SHARING_TYPE_VISIBLE
= 1
Tags
SHARING_TYPE_VISIBLE_AND_INSERTABLE
public
mixed
SHARING_TYPE_VISIBLE_AND_INSERTABLE
= 3
Tags
Properties
$sharingFilterType
public
static mixed
$sharingFilterType
= self::SHARING_TYPE_INSERTABLE
Tags
Methods
__construct()
Construct CSPortalObject instance.
public
__construct() : CSPortalObject
If this method is extended ensure that the object variable $this->record is set correctly.
Tags
Return values
CSPortalObject —applySharingToSubElements()
Transpose sharing to Object's children
public
final applySharingToSubElements([bool $makeAllElementsVisible = true ][, bool $applySharedWith = true ]) : void
Parameters
- $makeAllElementsVisible : bool = true
-
inherit visibility to child Objects
- $applySharedWith : bool = true
-
set access levels on children as well
Tags
Return values
void —copyToOwner()
Copies the object to a given owner
public
abstract copyToOwner([int $OwnerID = null ][, int $newParentID = null ]) : CSPortalObject
Parameters
- $OwnerID : int = null
-
the id of the new owner, default is the current user
- $newParentID : int = null
-
the id of the new parent object (e.g. tab for widgets)
Tags
Return values
CSPortalObject —the new object
delete()
Deletes the object from the database Adds a log entry of its deletion.
public
delete() : void
Tags
Return values
void —getCreationDate()
Get creation date of object
public
final getCreationDate() : string
Tags
Return values
string —the date when the object was created
getCreator()
Get the user name of the Object's creator
public
final getCreator() : string
Tags
Return values
string —the user name of the creator of the object
getID()
Retrieve Record ID of current Object
public
final getID() : int
Tags
Return values
int —the id of the object
getMetaDescription()
Get meta description of current Object
public
final getMetaDescription() : string
Tags
Return values
string —the meta description of the object
getMetaKeywords()
Get the meta keywords for current Object
public
final getMetaKeywords() : string
Tags
Return values
string —the meta keywords of the object
getModuleForTranslation()
Returns a module name for which the translation should be retrieved Default: "portal"
public
final getModuleForTranslation() : string
Tags
Return values
string —getOwnerID()
Get UserID of current Owner
public
final getOwnerID() : int
Tags
Return values
int —the ID of the current Owner
getRubrics()
Get the rubrics set for current Object
public
final getRubrics() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —the rubricIDS of the object
getSharingType()
Check if current Object is shared
public
final getSharingType() : int
Sharing types are:
- SHARING_TYPE_NONE (not shared) = 0
- SHARING_TYPE_VISIBLE (visible for others) = 1
- SHARING_TYPE_INSERTABLE (can be inserted in other portals) = 2
- SHARING_TYPE_VISIBLE_AND_INSERTABLE (visible to others and can be inserted) = 3
Tags
Return values
int —sharing type
getTitle()
Get the title of the Object
public
final getTitle([bool $translated = false ]) : string
Parameters
- $translated : bool = false
Tags
Return values
string —The title of the object
setID()
Set the ID of the Object
public
final setID(int $ID) : void
Parameters
- $ID : int
-
the ID of the object
Tags
Return values
void —setMetaDescription()
Set the meta description of current Object
public
final setMetaDescription(string $description) : void
Parameters
- $description : string
-
sets the description for the object
Tags
Return values
void —setMetaKeywords()
Set meta keywords describing current Object
public
final setMetaKeywords(string $keywords) : void
Parameters
- $keywords : string
-
sets a string with blank separated keywords for the object
Tags
Return values
void —setOwnerID()
Sets the OnwerID of the object
public
final setOwnerID(int $OwnerID) : void
Parameters
- $OwnerID : int
-
the id of the new Owner
Tags
Return values
void —setParentID()
Move Object to another parent Object.
public
final setParentID(int $ID) : void
E.g. by moving a widget to a different Tab or Portal
Parameters
- $ID : int
-
the ID of the parent object
Tags
Return values
void —setRubrics()
Set the Rubrics for current Object with ID list of ItemRubric Records
public
final setRubrics(array<string|int, mixed> $rubricIDs) : mixed
Parameters
- $rubricIDs : array<string|int, mixed>
-
the new rubricIDS of the object
Tags
Return values
mixed —setSharingType()
Set object sharing
public
final setSharingType(int $sharingType) : void
Sharing types are:
- SHARING_TYPE_NONE (not shared) = 0
- SHARING_TYPE_VISIBLE (visible for others) = 1
- SHARING_TYPE_INSERTABLE (can be inserted in other portals) = 2
- SHARING_TYPE_VISIBLE_AND_INSERTABLE (visible to others and can be inserted) = 3
Parameters
- $sharingType : int
-
the CSPortal SHARING_TYPE constants
Tags
Return values
void —setTitle()
Set the title of the Object
public
final setTitle(string $title) : void
Parameters
- $title : string
-
the title of the object
Tags
Return values
void —store()
Store current object to database
public
final store() : void
Stores the object to the database layer
