$propGetter = Closure::bind( function($prop){return $this->$prop;}, $element['field_text']['#object'], $element['field_text']['#object'] ); drupal_set_message('count='.count($propGetter('hostEntity')->field_captioned_carousel['und']));