name); } /** * Implements CerEntityContainerInterface::createInnerEntity(). */ public function createInnerEntity(EntityDrupalWrapper $owner) { // Create an empty field collection item. $collection = new EntityDrupalWrapper('field_collection_item', entity_create('field_collection_item', array('field_name' => $this->name))); $collection->host_entity->set( $owner ); $collection->save(TRUE); // 'Reference' the newly created field collection item. $this->getHandler($owner)->add($collection); return $collection; } }