PHP 클래스 Prado\Data\ActiveRecord\Scaffold\TScaffoldEditView

The RecordClass determines the Active Record class to be edited. A particular record can be edited by specifying the {@link setRecordPk RecordPk} value (may be an array for composite keys). The default editor input controls are created based on the column types. The editor layout can be specified by a renderer by set the value of the {@link setEditRenderer EditRenderer} property to the class name of a class that implements TScaffoldEditRenderer. A renderer is an external template control that implements IScaffoldEditRenderer. The Data of the IScaffoldEditRenderer will be set as the current Active Record to be edited. The UpdateRecord() method of IScaffoldEditRenderer is called when request to save the record is requested. Validators in the custom external editor template should have the {@link TBaseValidator::setValidationGroup ValidationGroup} property set to the value of the {@link getValidationGroup} of the TScaffoldEditView instance (the edit view instance is the Parent of the IScaffoldEditRenderer in most cases. Cosmetic changes to the default editor should be done using Cascading Stylesheets. For example, a particular field/property can be hidden by specifying "display:none" for the corresponding style (each field/property has unique Css class name as "property_xxx", where xxx is the property name).
부터: 3.1
상속: extends TScaffoldBase
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
bubbleEvent ( $sender, $param ) Bubble the command name event. Stops bubbling when the page validator false.
getCancelButton ( ) : TButton
getClearButton ( ) : TButton
getEditRenderer ( ) : string
getRecordPk ( ) : array
getSaveButton ( ) : TButton
getValidationGroup ( ) : string
initializeEditForm ( ) Initialize the editor form
onLoad ( $param ) Initialize the editor form if it is Visible.
setEditRenderer ( $value )
setRecordPk ( $value )

보호된 메소드들

메소드 설명
createEditRenderer ( $record, $classPath ) Instantiate the external edit renderer.
createRepeaterEditItem ( $sender, $param ) Initialize the default editor using the scaffold input builder.
doSave ( ) : boolean Check the validators, then tries to save the record.
getCurrentRecord ( ) : TActiveRecord
getInputRepeater ( ) : TRepeater
getScaffoldInputBuilder ( $record ) : TScaffoldInputBase Create the default scaffold editor control factory.

메소드 상세

bubbleEvent() 공개 메소드

Otherwise, the bubble event is continued.
public bubbleEvent ( $sender, $param )

createEditRenderer() 보호된 메소드

Instantiate the external edit renderer.
protected createEditRenderer ( $record, $classPath )

createRepeaterEditItem() 보호된 메소드

Initialize the default editor using the scaffold input builder.
protected createRepeaterEditItem ( $sender, $param )

doSave() 보호된 메소드

Check the validators, then tries to save the record.
protected doSave ( ) : boolean
리턴 boolean true if the validators are true, false otherwise.

getCancelButton() 공개 메소드

public getCancelButton ( ) : TButton
리턴 TButton Button to cancel the edit action (e.g. hide the edit view).

getClearButton() 공개 메소드

public getClearButton ( ) : TButton
리턴 TButton Button to clear the editor inputs.

getCurrentRecord() 보호된 메소드

protected getCurrentRecord ( ) : TActiveRecord
리턴 TActiveRecord current Active Record instance

getEditRenderer() 공개 메소드

public getEditRenderer ( ) : string
리턴 string the class name for scaffold editor. Defaults to empty, meaning not set.

getInputRepeater() 보호된 메소드

protected getInputRepeater ( ) : TRepeater
리턴 TRepeater default editor input controls repeater

getRecordPk() 공개 메소드

public getRecordPk ( ) : array
리턴 array Active Record primary key value.

getSaveButton() 공개 메소드

public getSaveButton ( ) : TButton
리턴 TButton Button triggered to save the Active Record.

getScaffoldInputBuilder() 보호된 메소드

Create the default scaffold editor control factory.
protected getScaffoldInputBuilder ( $record ) : TScaffoldInputBase
리턴 Prado\Data\ActiveRecord\Scaffold\InputBuilder\TScaffoldInputBase scaffold editor control factory.

getValidationGroup() 공개 메소드

public getValidationGroup ( ) : string
리턴 string editor validation group name.

initializeEditForm() 공개 메소드

Initialize the editor form
public initializeEditForm ( )

onLoad() 공개 메소드

Initialize the editor form if it is Visible.
public onLoad ( $param )

setEditRenderer() 공개 메소드

public setEditRenderer ( $value )

setRecordPk() 공개 메소드

public setRecordPk ( $value )