Class Vote_Controller
Package: HostCMS\Vote
Copyright:
© 2005-2021 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru
Author:
Hostmake LLC
Version:
6.x
Located at vote/controller.php
Methods summary
public static
object
|
#
instance( )
Register an existing instance as a singleton.
Register an existing instance as a singleton.
Returns
object
|
public
null|Core_Entity
|
#
getVotedObject( string $type, integer $id )
Getting voted object by type
Getting voted object by type
Parameters
- $type
- type name of voted object, e.g. 'comment'
- $id
- object ID
Returns
|
public
array
|
#
getRate( string $type, integer $id )
Getting rate by type and object ID
Getting rate by type and object ID
Parameters
- $type
- type name of voted object, e.g. 'comment'
- $id
- object ID
Returns
array 'likes', 'dislikes', 'rate'
|
public
array
|
#
getRateByObject( Core_Entity $oObject )
Getting rate by object
Parameters
Returns
array 'likes', 'dislikes', 'rate'
|
Properties summary
public static
mixed
|
$instance
|
|
protected
array
|
$_allowedTypes
List of allowed object for comment
List of allowed object for comment
|
#
array(
'comment',
'informationsystem_item',
'shop_item'
)
|