PHP Class TbCountOfTypeOperation

Renders a summary based on the count of specified types. For example, if a value has a type 'blue', this class will count the number of times the value 'blue' has on that column.
Inheritance: extends TbOperation
Show file Open project: yinhe/yincart

Public Properties

Property Type Description
$template string
$typeTemplate string holds the template of each calculated type
$types array hold the configuration of types to calculate. The configuration is set by an array which keys are the value types to count. You can set their 'label' independently.
 'types' => array(
     '0' => array('label' => 'zeros'),
     '1' => array('label' => 'ones'),
     '2' => array('label' => 'twos')

Public Methods

Method Description
displaySummary ( ) : mixed | void (no phpDoc)
init ( ) Widget's initialization
processValue ( $value ) : mixed | void (no phpDoc)

Method Details

displaySummary() public method

(no phpDoc)
See also: TbOperation
public displaySummary ( ) : mixed | void
return mixed | void

init() public method

Widget's initialization
public init ( )

processValue() public method

(no phpDoc)
See also: TbOperation
public processValue ( $value ) : mixed | void
$value
return mixed | void

Property Details

$template public property

See also: parent class
public string $template
return string

$typeTemplate public property

holds the template of each calculated type
public string $typeTemplate
return string

$types public property

hold the configuration of types to calculate. The configuration is set by an array which keys are the value types to count. You can set their 'label' independently.
 'types' => array(
     '0' => array('label' => 'zeros'),
     '1' => array('label' => 'ones'),
     '2' => array('label' => 'twos')
public array $types
return array