Get notes and events from dataObject

Is it possible to receive the notes from the dataObject? So let’s say I have a dataObject called Article. Can I do something like this? $article->getNotes?

Using Pimcore/Model/DataObject php api you can get object data form class.

Use p_r($dataobject); to explore properties in it.

Let me know if you need any clarification.

Thanks
Sandeep Sahu

Hi Sahu, thanks for your reply. I cant’ find the notes and events there.

Just to be clear, I mean these notes and events:https://pimcore.com/docs/6.x/Development_Documentation/Tools_and_Features/Notes_and_Events.html

https://pimcore.com/docs/6.x/Development_Documentation/Tools_and_Features/Notes_and_Events.html

I solved it, so for future googlers. This is how:

$id = $article->getId();
$condition = “(cid LIKE {$id})”;
$listing = new Note\Listing();
$listing->setCondition($condition);
$listing->load();

$notes = $listing->getNotes();

Thanks for your contribution.