예제 #1
0
 /**
  * (non-PHPdoc)
  * @see PartKeepr\Util.Serializable::serialize()
  */
 public function serialize()
 {
     return array("id" => $this->getId(), "name" => $this->getName(), "description" => $this->getDescription(), "comment" => $this->getComment(), "stockLevel" => $this->getStockLevel(), "footprint" => is_object($this->footprint) ? $this->footprint->getId() : null, "minStockLevel" => $this->minStockLevel, "status" => $this->getStatus(), "storageLocation" => is_object($this->storageLocation) ? $this->storageLocation->getId() : null, "category" => is_object($this->category) ? $this->category->getId() : null, "partUnit" => is_object($this->partUnit) ? $this->getPartUnit()->getId() : null, "manufacturers" => $this->serializeChildren($this->getManufacturers()), "distributors" => $this->serializeChildren($this->getDistributors()), "images" => $this->serializeChildren($this->getImages()), "attachments" => $this->serializeChildren($this->getAttachments()), "parameters" => $this->serializeChildren($this->getParameters()), "createDate" => $this->getCreateDate()->format("Y-m-d H:i:s"), "needsReview" => $this->getReviewFlag(), "partCondition" => $this->getCondition(), "internalPartNumber" => $this->getInternalPartNumber(), "categoryName" => is_object($this->category) ? $this->category->getName() : null, "footprintName" => is_object($this->footprint) ? $this->footprint->getName() : null, "storageLocationName" => is_object($this->storageLocation) ? $this->storageLocation->getName() : null);
 }