Свойство | Type | Description | |
---|---|---|---|
$field | Field object associated with this CommentArray | ||
$numLimit | integer | May vary from count() when on the last page of a result set. As a result, paging routines should refer to their own itemsPerPage rather than count(). Applicable for paginated result sets. This number is not enforced for adding items to this CommentArray. | |
$numStart | integer | If this CommentArray is a partial representation of a larger set, this will contain the starting result number if previous results preceded it. | |
$numTotal | integer | Total number of comments, including those here and others that aren't, but may be here in pagination. | |
$page | Page that owns these comments, required to use the renderForm() or getCommentForm() methods. |
Méthode | Description | |
---|---|---|
getCommentForm ( array $options = [] ) : CommentForm | Return instance of CommentForm object | |
getCommentList ( array $options = [] ) | Return instance of CommentList object | |
getField ( ) | Get the Field that these comments are on | |
getLimit ( ) : integer | Get the imposed limit on number of comments. | |
getPage ( ) | Get the page that these comments are on | |
getTotal ( ) : integer | Get the total number of comments | |
isIdentical ( WireArray $items, boolean | integer $strict = true ) : boolean | Is the given CommentArray identical to this one? | |
isValidItem ( $item ) | Per the WireArray interface, is the item a Comment | |
makeNew ( ) | ||
render ( array $options = [] ) : string | Provides the default rendering of a comment list, which may or may not be what you want | |
renderAll ( array $options = [] ) : string | Render all comments and a comments form below it | |
renderForm ( array $options = [] ) : string | Provides the default rendering of a comment form, which may or may not be what you want | |
renderStars ( boolean $showCount = false, array $options = [] ) : string | Render combined star rating for all comments in this CommentsArray | |
setField ( Field $field ) | Set the Field that these comments are on | |
setPage ( Page $page ) | Set the page that these comments are on | |
stars ( boolean $allowPartial = true, boolean $getCount = false ) : integer | float | false | array | Get an average of all star ratings for all comments in this CommentsArray |
public getCommentForm ( array $options = [] ) : CommentForm | ||
$options | array | |
Résultat | CommentForm |
public getCommentList ( array $options = [] ) | ||
$options | array |
public isValidItem ( $item ) |
public renderForm ( array $options = [] ) : string | ||
$options | array | |
Résultat | string |
public setField ( Field $field ) | ||
$field | Field |
public setPage ( Page $page ) | ||
$page | Page |
public stars ( boolean $allowPartial = true, boolean $getCount = false ) : integer | float | false | array | ||
$allowPartial | boolean | Allow partial stars? If true, returns a float. If false, returns int. |
$getCount | boolean | If true, this method returns an array(stars, count) where count is number of ratings. |
Résultat | integer | float | false | array | Returns false for stars value if no ratings yet. |
protected int $numLimit | ||
Résultat | integer |
protected int $numStart | ||
Résultat | integer |
protected int $numTotal | ||
Résultat | integer |