Neos\Neos\Ui\Domain\Model\FeedbackCollection::add PHP Method

add() public method

Add feedback
public add ( Neos\Neos\Ui\Domain\Model\FeedbackInterface $feedback ) : void
$feedback Neos\Neos\Ui\Domain\Model\FeedbackInterface
return void
    public function add(FeedbackInterface $feedback)
    {
        foreach ($this->feedbacks as $value) {
            if ($value->isSimilarTo($feedback)) {
                return;
            }
        }
        $this->feedbacks[] = $feedback;
    }

Usage Example

Example #1
0
 /**
  * Helper method to inform the client, that new workspace information is available
  *
  * @return void
  */
 protected function updateWorkspaceInfo()
 {
     $nodeService = new NodeService();
     $updateWorkspaceInfo = new UpdateWorkspaceInfo();
     $updateWorkspaceInfo->setDocument($nodeService->getClosestDocument($this->getSubject()));
     $this->feedbackCollection->add($updateWorkspaceInfo);
 }
All Usage Examples Of Neos\Neos\Ui\Domain\Model\FeedbackCollection::add