sammarks / ablecore

A library for Drupal developers.
MIT License
5 stars 4 forks source link

Possible issue with calling functions off of FieldValueCollection #3

Closed sammarks closed 10 years ago

sammarks commented 10 years ago

Sometimes calls like this:

$node->field_image_field->style('test_style');

don't work and have to be replaced with this:

$node->field_image_field->first()->style('test_style');

We need to make sure the check that the __call function on the FieldValueCollection is checking for methods in the first item in the collection to call.

The intended behavior is that we should be able to access properties or call methods off of the first object in the collection without having to explicitly say we're getting values from the first object.