I know its very lame question to ask. I have One Entity ContentSelector and another is Content in Content Selector I have a property Content where I have Id. I am trying to access the Content propety but always getting error. This is what I am trying to do.
$cs = $pages->getContentSelector();
"title": "my Title",
"Notice: Undefined property: Doctrine\\ORM\\PersistentCollection::$content"
The getContentSelector() method return an ArrayCollection so you need to access to an element of the collection before call a method of the contained object. As example, you can access to the first element as follow:
$collection = $pages->getContentSelector(); $cs = $collection->first();
Then you can try access to the objet element (from the dump seems a json object?)
Hope this help