In template_preprocess_views_view_fields(&$variables), when I print $variables['row'], I get the following object.

enter image description here

How can I access values inside the node entity?

I tried with the following code, but it is not working.


1 Answer 1


values is protected, so you have to use the get() method:


For the field object this shortcut is available (this is not standard OOP and works for fields only):


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.