public function __construct(Gadget $item) { $this->id = $item->getId(); $this->installationDate = $item->getInstallationDate(); $this->updateDate = $item->getUpdateDate(); $this->gadgetContainer = $item->getGadgetContainer()->getId(); $this->gadgetType = $item->getGadgetType(); $this->options = $item->getOptions(); $this->column = $item->getColumn(); $this->position = $item->getPosition(); }