When a file is formatted in the context of a referencing entity, it can known about that entity using $file->referencing_entity. But without the type of that entity, there is little one can do with it.

Comments

pbuyle’s picture

Status: Active » Needs review
StatusFileSize
new929 bytes

The attached patch provides the type of the referencing entity as $file->referencing_entity_type.

devin carlson’s picture

Status: Needs review » Fixed

That makes sense to me!

Tested and committed to File Entity 7.x-2.x.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.