public function clearProperties() { foreach ($this->properties as $property) { $property->setParent(null); } $this->properties->clear(); return $this; }