CommentForm
extends Model
in package
CommentForm
Tags
Table of Contents
Properties
- $comment : Comment
- $fileList : array<string|int, mixed>
- The list of files attached to a comment
- $target : Comment|ContentActiveRecord
Methods
- __construct() : mixed
- formName() : string
- load() : mixed
- rules() : array<string|int, mixed>
- save() : bool
- Saves the form
- validate() : bool
Properties
$comment
public
Comment
$comment
The model to comment
$fileList
The list of files attached to a comment
public
array<string|int, mixed>
$fileList
$target
public
Comment|ContentActiveRecord
$target
The model to comment or other active content
Methods
__construct()
public
__construct(mixed $target[, mixed $comment = null ]) : mixed
Parameters
- $target : mixed
- $comment : mixed = null
formName()
public
formName() : string
Return values
stringload()
public
load(mixed $data[, mixed $formName = null ]) : mixed
Parameters
- $data : mixed
- $formName : mixed = null
Tags
rules()
public
rules() : array<string|int, mixed>
Return values
array<string|int, mixed> —validation rules for model attributes.
save()
Saves the form
public
save() : bool
Tags
Return values
boolvalidate()
public
validate([null $attributeNames = null ][, bool $clearErrors = true ]) : bool
Parameters
- $attributeNames : null = null
- $clearErrors : bool = true