CerEntityContainerInterface.inc 706 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * @interface
  4. *
  5. * This interface should be implemented by field plugins which can create embedded
  6. * entities on the fly.
  7. *
  8. * The prime example is field collections. CER might need to add a backreference on
  9. * a field which is in a field collection, yet there might be no field collection items
  10. * on which to add the reference. In that case, a new field collection item must be
  11. * be created and referenced properly by the owner.
  12. */
  13. interface CerEntityContainerInterface {
  14. /**
  15. * Creates an embedded entity.
  16. *
  17. * @return EntityDrupalWrapper
  18. * The newly created embedded entity, in a metadata wrapper.
  19. */
  20. public function createInnerEntity(EntityDrupalWrapper $owner);
  21. }