public function copy(LogWidgetConfig $source = null) { if ($source !== null) { $this->setRestrictions($source->getRestrictions()); $this->setAmount($source->getAmount()); } }