PHP Class Prado\Data\ActiveRecord\Scaffold\TScaffoldBase

Provides common properties for all scaffold views (such as, TScaffoldListView, TScaffoldEditView, TScaffoldListView and TScaffoldView). During the OnPrRender stage the default css style file (filename style.css) is published and registered. To override the default style, provide your own stylesheet file explicitly.
Since: 3.1
Inheritance: extends Prado\Web\UI\TTemplateControl
ファイルを表示 Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
getDefaultStyle ( ) : string
getEnableDefaultStyle ( ) : boolean
getRecordClass ( ) : string Name of the Active Record class to be viewed or scaffolded.
onPreRender ( $param ) Publish the default stylesheet file.
setDefaultStyle ( $value )
setEnableDefaultStyle ( $value )
setRecordClass ( $value ) Name of the Active Record class to be viewed or scaffolded.

Protected Methods

Method Description
clearRecordObject ( ) Unset the current record instance and table information.
copyFrom ( TScaffoldBase $obj ) Copy the view details from another scaffold view instance.
getRecordFinder ( ) : TActiveRecord
getRecordObject ( $pk = null ) : TActiveRecord Gets the current Active Record instance. Creates new instance if the primary key value is null otherwise the record is fetched from the db.
getRecordPkValues ( $record ) : array
getRecordPropertyValues ( $record ) : array
getTableInfo ( ) : TDbMetaData
setRecordObject ( TActiveRecord $value )

Method Details

clearRecordObject() protected method

Unset the current record instance and table information.
protected clearRecordObject ( )

copyFrom() protected method

Copy the view details from another scaffold view instance.
protected copyFrom ( TScaffoldBase $obj )
$obj TScaffoldBase

getDefaultStyle() public method

public getDefaultStyle ( ) : string
return string default scaffold stylesheet name

getEnableDefaultStyle() public method

public getEnableDefaultStyle ( ) : boolean
return boolean enable default stylesheet, default is true.

getRecordClass() public method

Name of the Active Record class to be viewed or scaffolded.
public getRecordClass ( ) : string
return string Active Record class name.

getRecordFinder() protected method

protected getRecordFinder ( ) : TActiveRecord
return Prado\Data\ActiveRecord\TActiveRecord Active Record finder instance

getRecordObject() protected method

Gets the current Active Record instance. Creates new instance if the primary key value is null otherwise the record is fetched from the db.
protected getRecordObject ( $pk = null ) : TActiveRecord
return Prado\Data\ActiveRecord\TActiveRecord record instance

getRecordPkValues() protected method

protected getRecordPkValues ( $record ) : array
return array record primary key values.

getRecordPropertyValues() protected method

protected getRecordPropertyValues ( $record ) : array
return array record property values

getTableInfo() protected method

protected getTableInfo ( ) : TDbMetaData
return TDbMetaData table/view information

onPreRender() public method

Publish the default stylesheet file.
public onPreRender ( $param )

setDefaultStyle() public method

public setDefaultStyle ( $value )

setEnableDefaultStyle() public method

public setEnableDefaultStyle ( $value )

setRecordClass() public method

Name of the Active Record class to be viewed or scaffolded.
public setRecordClass ( $value )

setRecordObject() protected method

protected setRecordObject ( TActiveRecord $value )
$value Prado\Data\ActiveRecord\TActiveRecord