Able to see a variable in print_r()'s output, but not sure how to access it in code

后端 未结 9 806

I googled, installed Devel, Drupal for Firebug, but I can\'t find it.

I found what I want, I know where it is; I just don\'t know how to g

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-22 03:07

    You should use field_view_field($entity_type, $entity, $field_name, $display = array(), $langcode = NULL) , that will return renderable array . You can check api document https://api.drupal.org/api/drupal/modules%21field%21field.module/function/field_view_field/7.x

提交回复
热议问题