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.236

Latest news

  • ProcessWire Weekly #550
    In the 550th issue of ProcessWire Weekly we're going to check out the latest core updates, introduce a new third party module called PagefileMetadata, and more. Read on!
    Weekly.pw / 23 November 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull