\Comment\ServiceComment

Summary

Methods
Properties
Constants
getServiceLocator()
__construct()
commentOwner()
add()
treeByEntity()
getComments()
tree()
delete()
edit()
createForm()
getAddCommentForm()
getEntityByCommentId()
No public properties found
No constants found
No protected methods found
$serviceManager
N/A
No private methods found
No private properties found
N/A

Properties

$serviceManager

$serviceManager : null|\Zend\ServiceManager\ServiceManager

Type

null|\Zend\ServiceManager\ServiceManager

Methods

getServiceLocator()

getServiceLocator() : null|\Zend\ServiceManager\ServiceManager

Returns

null|\Zend\ServiceManager\ServiceManager

__construct()

__construct(\Zend\ServiceManager\ServiceManager  $sm) 

Parameters

\Zend\ServiceManager\ServiceManager $sm

commentOwner()

commentOwner(  $comment) : boolean

Parameters

$comment

Returns

boolean

add()

add(\Zend\Form\Form  $form,   $data) : \Comment\Entity\Comment|null

Parameters

\Zend\Form\Form $form
$data

Throws

\Exception

Returns

\Comment\Entity\Comment|null

treeByEntity()

treeByEntity(  $entity) : array

Parameters

$entity

Throws

\Comment\Service\BadMethodCallException
\Doctrine\ORM\EntityNotFoundException

Returns

array

getComments()

getComments(\Comment\Entity\EntityType  $entityType,   $entityId) : array

Parameters

\Comment\Entity\EntityType $entityType
$entityId

Returns

array

tree()

tree(  $alias,   $entityId) : array

$alias is an alias that is used in EntityType to recognize the entity

Parameters

$alias
$entityId

Throws

\Doctrine\ORM\EntityNotFoundException
\Exception

Returns

array

delete()

delete(  $id) : boolean

Parameters

$id

Throws

\Exception

Returns

boolean

createForm()

createForm(\Comment\Entity\Comment  $comment = null) : \Zend\Form\Form

Parameters

\Comment\Entity\Comment $comment

Throws

\Exception

Returns

\Zend\Form\Form

getAddCommentForm()

getAddCommentForm(  $form,   $entityId,   $entity) : string

Parameters

$form
$entityId
$entity

Returns

string

getEntityByCommentId()

getEntityByCommentId(  $id) : mixed

Parameters

$id

Throws

\Doctrine\ORM\EntityNotFoundException

Returns

mixed