CSPortalTab
extends CSPortalObject
in package
API of a CS Portal Tab as it is stored in the database
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.
- addWidget() : CSPortalWidget
- Adds a widget to the tab
- 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.
- getCols() : int
- Get number of Columns in Tab
- getColWidths() : string
- Get width of Columns in Tab
- getCreationDate() : string
- Get creation date of object
- getCreator() : string
- Get the user name of the Object's creator
- getHideWidgetTitle() : bool
- Check if titles are hidden from Widgets inside Tab
- getIcon() : string
- Get Tab Icon path
- 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
- getPortal() : CSPortalPortal
- Returns the Portal of the Tab
- getPortalPortalID() : int
- Get the ID of the Tab's parent Portal
- getRubrics() : array<string|int, mixed>
- Get the rubrics set for current Object
- getSharingType() : int
- Check if current Object is shared
- getSortOrder() : int
- Get Tab sort order
- getTitle() : string
- Get the title of the Object
- getWidgets() : array<string|int, mixed>
- Retrieve Widgets in Tab
- setCols() : void
- Set number of Columns in Tab
- setColWidths() : void
- Set width of Columns in Tab
- setHideWidgetTitle() : void
- Sets the Hide Widget Title flag
- setIcon() : void
- Sets the Tab Icon path
- 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.
- setPortalPortalID() : void
- Sets the PortalID of the Tab Move Tab to another Portal
- setRubrics() : mixed
- Set the Rubrics for current Object with ID list of ItemRubric Records
- setSharingType() : void
- Set object sharing
- setSortOrder() : void
- Set sort order of Tab
- 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 —addWidget()
Adds a widget to the tab
public
addWidget(string $Title, int $Col[, string $UwaUrl = '' ][, string $Provider = '' ]) : CSPortalWidget
Parameters
- $Title : string
-
the Title of the Widget
- $Col : int
-
the col number where to place the widget starting from 0
- $UwaUrl : string = ''
-
UWA URL of Widget (optional)
- $Provider : string = ''
-
Provider of Widget (optional)
Tags
Return values
CSPortalWidget —the CSPortalWidget
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 —getCols()
Get number of Columns in Tab
public
getCols() : int
Tags
Return values
int —number of columns in the tab
getColWidths()
Get width of Columns in Tab
public
getColWidths() : string
Tags
Return values
string —pipe speparated widths in px or % for each col in the tab
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
getHideWidgetTitle()
Check if titles are hidden from Widgets inside Tab
public
getHideWidgetTitle() : bool
Tags
Return values
bool —getIcon()
Get Tab Icon path
public
getIcon() : string
Tags
Return values
string —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
getPortal()
Returns the Portal of the Tab
public
getPortal() : CSPortalPortal
Tags
Return values
CSPortalPortal —getPortalPortalID()
Get the ID of the Tab's parent Portal
public
getPortalPortalID() : int
Tags
Return values
int —the PortalID of the tab
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
getSortOrder()
Get Tab sort order
public
getSortOrder() : int
Tags
Return values
int —the sort order of the tab from left to right
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
getWidgets()
Retrieve Widgets in Tab
public
getWidgets([bool $returnOnlyVisible = true ]) : array<string|int, mixed>
Parameters
- $returnOnlyVisible : bool = true
-
only visible tabs should be returned
Tags
Return values
array<string|int, mixed> —setCols()
Set number of Columns in Tab
public
setCols(mixed $cols) : void
Parameters
- $cols : mixed
Tags
Return values
void —setColWidths()
Set width of Columns in Tab
public
setColWidths(mixed $widths) : void
Parameters
- $widths : mixed
Tags
Return values
void —setHideWidgetTitle()
Sets the Hide Widget Title flag
public
setHideWidgetTitle([bool $status = false ]) : void
Parameters
- $status : bool = false
Tags
Return values
void —setIcon()
Sets the Tab Icon path
public
setIcon([string $path = '' ]) : void
Parameters
- $path : string = ''
Tags
Return values
void —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 —setPortalPortalID()
Sets the PortalID of the Tab Move Tab to another Portal
public
setPortalPortalID(int $PortalID) : void
Parameters
- $PortalID : int
-
the PortalID of the tab
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 —setSortOrder()
Set sort order of Tab
public
setSortOrder(mixed $sortOrder) : void
Parameters
- $sortOrder : mixed
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
