Permissiontemplates
extends CActiveRecord
in package
This is the model class for table "{{permissiontemplates}}".
The following are the available columns in table '{{permissiontemplates}}':
Table of Contents
Properties
- $created_at : string
- $created_by : int
- $description : string
- $name : string
- $ptid : int
- $renewed_last : string
Methods
- applyToUser() : bool
- Apply a user role to the user.
- clearUser() : bool
- Clear User.
- compileExportXML() : SimpleXMLElement
- createFromXML() : Permissiontemplates|bool
- getButtons() : string
- Gets the buttons for the GridView
- getColumns() : array<string|int, mixed>
- Returns Columns.s
- getConnectedUserobjects() : array<string|int, mixed>
- Collects and maps the connected userids to userobjects
- getDateFormat() : string
- Returns Date Format.
- getFormattedDateCreated() : string
- Returns formatted 'created at' date.
- getFormattedDateModified() : string
- Returns formatted 'renewed_last' date.
- getHasPermission() : bool
- Return true if this role GIVE a permission Used in self::compileExportXML only
- model() : Permissiontemplates
- Returns the static model of the specified AR class.
- relations() : array<string|int, mixed>
- removeCdataFormat() : string
- rules() : array<string|int, mixed>
- search() : CActiveDataProvider
- Retrieves a list of models based on the current search/filter conditions.
- tableName() : string
Properties
$created_at
public
string
$created_at
$created_by
public
int
$created_by
$description
public
string
$description
$name
public
string
$name
$ptid
public
int
$ptid
$renewed_last
public
string
$renewed_last
Methods
applyToUser()
Apply a user role to the user.
public
applyToUser(int $iUserId[, int $ptid = null ]) : bool
A user role is defined in table prefix_permissiontemplates. If user does not have the user role already, a new entry will be made in table prefix_user_in_permissionrole
Parameters
- $iUserId : int
- $ptid : int = null
-
Permissiontemplates id
Return values
boolclearUser()
Clear User.
public
clearUser(int $iUserId) : bool
Parameters
- $iUserId : int
Return values
boolcompileExportXML()
public
compileExportXML() : SimpleXMLElement
Return values
SimpleXMLElementcreateFromXML()
public
createFromXML(SimpleXMLElement $xmlEntitiy[, bool $includeRootData = false ]) : Permissiontemplates|bool
Parameters
- $xmlEntitiy : SimpleXMLElement
- $includeRootData : bool = false
Return values
Permissiontemplates|boolgetButtons()
Gets the buttons for the GridView
public
getButtons() : string
Return values
stringgetColumns()
Returns Columns.s
public
getColumns() : array<string|int, mixed>
Return values
array<string|int, mixed>getConnectedUserobjects()
Collects and maps the connected userids to userobjects
public
getConnectedUserobjects() : array<string|int, mixed>
Return values
array<string|int, mixed> —filled with usermodels
getDateFormat()
Returns Date Format.
public
getDateFormat() : string
Return values
stringgetFormattedDateCreated()
Returns formatted 'created at' date.
public
getFormattedDateCreated() : string
Return values
stringgetFormattedDateModified()
Returns formatted 'renewed_last' date.
public
getFormattedDateModified() : string
Return values
stringgetHasPermission()
Return true if this role GIVE a permission Used in self::compileExportXML only
public
getHasPermission(string $sPermission, string $sCRUD) : bool
Parameters
- $sPermission : string
- $sCRUD : string
Return values
boolmodel()
Returns the static model of the specified AR class.
public
static model([string $className = __CLASS__ ]) : Permissiontemplates
Please note that you should have this exact method in all your CActiveRecord descendants!
Parameters
- $className : string = __CLASS__
-
active record class name.
Return values
Permissiontemplates —the static model class
relations()
public
relations() : array<string|int, mixed>
Return values
array<string|int, mixed> —relational rules.
removeCdataFormat()
public
removeCdataFormat(mixed $node) : string
Parameters
- $node : mixed
-
XML node?
Return values
stringrules()
public
rules() : array<string|int, mixed>
Return values
array<string|int, mixed> —validation rules for model attributes.
search()
Retrieves a list of models based on the current search/filter conditions.
public
search() : CActiveDataProvider
Typical usecase:
- Initialize the model fields with values from filter form.
- Execute this method to get CActiveDataProvider instance which will filter models according to data in model fields.
- Pass data provider to CGridView, CListView or any similar widget.
Return values
CActiveDataProvider —the data provider that can return the models based on the search/filter conditions.
tableName()
public
tableName() : string
Return values
string —the associated database table name