| @@ 179-187 (lines=9) @@ | ||
| 176 | $this->collection_details | |
| 177 | ); | |
| 178 | $identifier = $this->setIdentifier($entity, $identifier); | |
| 179 |         if ($this->collection->has($identifier)) { | |
| 180 | do_action( | |
| 181 | 'FHEE__CollectionLoader__addEntityToCollection__entity_already_added', | |
| 182 | $this, | |
| 183 | $this->collection_details->collectionName(), | |
| 184 | $this->collection_details | |
| 185 | ); | |
| 186 | return CollectionLoader::ENTITY_EXISTS; | |
| 187 | } | |
| 188 |         if ($this->collection->add($entity, $identifier)) { | |
| 189 | do_action( | |
| 190 | 'FHEE__CollectionLoader__addEntityToCollection__entity_added', | |
| @@ 188-196 (lines=9) @@ | ||
| 185 | ); | |
| 186 | return CollectionLoader::ENTITY_EXISTS; | |
| 187 | } | |
| 188 |         if ($this->collection->add($entity, $identifier)) { | |
| 189 | do_action( | |
| 190 | 'FHEE__CollectionLoader__addEntityToCollection__entity_added', | |
| 191 | $this, | |
| 192 | $this->collection_details->collectionName(), | |
| 193 | $this->collection_details | |
| 194 | ); | |
| 195 | return CollectionLoader::ENTITY_ADDED; | |
| 196 | } | |
| 197 | do_action( | |
| 198 | 'FHEE__CollectionLoader__addEntityToCollection__entity_not_added', | |
| 199 | $this, | |