Class \Prado\Data\ActiveRecord\Scaffold\TScaffoldEditView
The RecordClass determines the Active Record class to be edited. A particular record can be edited by specifying the \Prado\Data\ActiveRecord\Scaffold\setRecordPk 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 \Prado\Data\ActiveRecord\Scaffold\setEditRenderer 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 \Prado\Web\UI\WebControls\TBaseValidator::setValidationGroup property set to the value of the 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).
Class hierarchy
- \Prado\Data\ActiveRecord\Scaffold\TScaffoldEditView
- \Prado\Data\ActiveRecord\Scaffold\TScaffoldBase
- \Prado\Web\UI\TTemplateControl
- \Prado\Web\UI\TCompositeControl implements INamingContainer
- \Prado\Web\UI\TControl implements IRenderable, IBindable
- \Prado\TApplicationComponent
- \Prado\TComponent
Since: 3.1
public
|
bubbleEvent(mixed $sender, mixed $param) : mixed
Bubble the command name event. Stops bubbling when the page validator false.
Otherwise, the bubble event is continued. |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
protected
|
createEditRenderer(TActiveRecord $record, string $classPath) : mixed
Instantiate the external edit renderer.
|
protected
|
createRepeaterEditItem(mixed $sender, mixed $param) : mixed
Initialize the default editor using the scaffold input builder.
|
protected
|
|
protected
|
|
protected
|
|
protected
|
getScaffoldInputBuilder(TActiveRecord $record) : TScaffoldInputBase
Create the default scaffold editor control factory.
|