Loading field_collection.entity.inc +10 −0 Original line number Diff line number Diff line Loading @@ -183,6 +183,10 @@ class FieldCollectionItemEntity extends Entity { * @param $create_link * (optional) Whether a field-item linking the host entity to the field * collection item should be created. * * @throws Exception * throws exception only during creation of a field collection item. * */ public function setHostEntity($entity_type, $entity, $langcode = LANGUAGE_NONE, $create_link = TRUE) { if (!empty($this->is_new)) { Loading Loading @@ -460,6 +464,12 @@ class FieldCollectionItemEntity extends Entity { * (internal) If TRUE is passed, the host entity is not saved automatically * and therefore no link is created between the host and the item or * revision updates might be skipped. Use with care. * * @return boolean * retrun boolean value on node save * * @throws Exception * throws Exception when Unable to save a field collection without valid reference to a host entity. */ public function save($skip_host_save = FALSE) { // Make sure we have a host entity during creation. Loading field_collection.migrate.inc +7 −1 Original line number Diff line number Diff line Loading @@ -95,6 +95,9 @@ class MigrateDestinationFieldCollection extends MigrateDestinationEntity { * @return array|bool * Array of key fields (item_id only in this case) of the collection that * was saved or FALSE on failure. * * @throws MigrateException * throws exception when host entity not found. */ public function import(stdClass $collection, stdClass $row) { $updating = FALSE; Loading Loading @@ -170,8 +173,11 @@ class MigrateDestinationFieldCollection extends MigrateDestinationEntity { /** * Delete a migrated collection. * * @param $key * @param array $key * Array of fields representing the key. * * @return boolean * return a boolean value */ public function rollback(array $key) { $item_id = reset($key); Loading field_collection.module +2 −2 Original line number Diff line number Diff line Loading @@ -183,10 +183,10 @@ function field_collection_item_load($item_id, $reset = FALSE) { /** * Loads a field collection revision. * * @param $revision_id * @param int $revision_id * The id of the revision to load. * * @return * @return bool|mixed * The entity object, or FALSE if there is no entity with the given revision * id. */ Loading Loading
field_collection.entity.inc +10 −0 Original line number Diff line number Diff line Loading @@ -183,6 +183,10 @@ class FieldCollectionItemEntity extends Entity { * @param $create_link * (optional) Whether a field-item linking the host entity to the field * collection item should be created. * * @throws Exception * throws exception only during creation of a field collection item. * */ public function setHostEntity($entity_type, $entity, $langcode = LANGUAGE_NONE, $create_link = TRUE) { if (!empty($this->is_new)) { Loading Loading @@ -460,6 +464,12 @@ class FieldCollectionItemEntity extends Entity { * (internal) If TRUE is passed, the host entity is not saved automatically * and therefore no link is created between the host and the item or * revision updates might be skipped. Use with care. * * @return boolean * retrun boolean value on node save * * @throws Exception * throws Exception when Unable to save a field collection without valid reference to a host entity. */ public function save($skip_host_save = FALSE) { // Make sure we have a host entity during creation. Loading
field_collection.migrate.inc +7 −1 Original line number Diff line number Diff line Loading @@ -95,6 +95,9 @@ class MigrateDestinationFieldCollection extends MigrateDestinationEntity { * @return array|bool * Array of key fields (item_id only in this case) of the collection that * was saved or FALSE on failure. * * @throws MigrateException * throws exception when host entity not found. */ public function import(stdClass $collection, stdClass $row) { $updating = FALSE; Loading Loading @@ -170,8 +173,11 @@ class MigrateDestinationFieldCollection extends MigrateDestinationEntity { /** * Delete a migrated collection. * * @param $key * @param array $key * Array of fields representing the key. * * @return boolean * return a boolean value */ public function rollback(array $key) { $item_id = reset($key); Loading
field_collection.module +2 −2 Original line number Diff line number Diff line Loading @@ -183,10 +183,10 @@ function field_collection_item_load($item_id, $reset = FALSE) { /** * Loads a field collection revision. * * @param $revision_id * @param int $revision_id * The id of the revision to load. * * @return * @return bool|mixed * The entity object, or FALSE if there is no entity with the given revision * id. */ Loading