public function setCollection(Collection $C) { $this->collection = $C; $this->collectionOf = $C->getCollectionOf(); }