CommentStars class

Located in file /wire/modules/Fieldtype/FieldtypeComments/CommentStars.php

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the CommentStars class also inherits all the methods and properties of: WireData and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
CommentStars::countClass string Class used for the renderCount() method 
CommentStars::countLabelPlural string Plural count label 
CommentStars::countLabelSingular string Single count label 
CommentStars::detailsLabel string Star details label 
CommentStars::numStars int Max number of stars 
CommentStars::render()
stringRender stars 
CommentStars::renderCount(int $count)
stringRender a count of ratings 
CommentStars::setDefault($key, $value)
(nothing)Change one of the defaults (see $defaults) 
CommentStars::star string Default star output (can be overridden with HTML) 
CommentStars::starClass string Class for stars whether on or off 
CommentStars::starOff string Optionally use this star/HTML for OFF state 
CommentStars::starOffClass string Class for inactive/off stars 
CommentStars::starOn string Optionally use this star/HTML for ON state 
CommentStars::starOnClass string Class for active/on stars 
CommentStars::starPartialClass string Class for partial (half lit star) 
CommentStars::unratedLabel string Unrated label 
CommentStars::wrapClass string Wrapping element class, required for JS and CSS 
CommentStars::wrapClassInput string Wrapping input element class, required for JS and CSS 

Additional methods and properties

In addition to the methods and properties above, CommentStars also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.200

Twitter updates

  • New post: Multi-language field translation export/import — In this post we cover the details of a new module that enables export and import capabilities for multi-language fields in ProcessWire… More
    5 August 2022
  • Weekly update, July 29: Continuing upgrades to ProcessWire’s comments system and FormBuilder, along with a working example—More
    29 July 2022
  • Weekly update for July 22– Looking back at what web development was like in the year 2000. Plus some more discussion on the path from CKEditor 4 to CkEditor 5 in ProcessWire: More
    22 July 2022

Latest news

  • ProcessWire Weekly #430
    In the 430th issue of ProcessWire Weekly we're going to check out some brand new third party modules, a new site of the week, and more. Read on!
    Weekly.pw / 7 August 2022
  • Multi-language field translation export/import
    In this post we cover the details of a new module that enables export and import capabilities for multi-language fields in ProcessWire.
    Blog / 5 August 2022
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer