id = $id; return $this; } /** * Gets id. * * @return int */ public function getId() { return $this->id; } /** * Sets parent. * * @param Equipment $parent * * @return $this */ public function setParent(Equipment $parent) { $this->parent = $parent; return $this; } /** * Gets parent. * * @return Equipment */ public function getParent() { return $this->parent; } /** * Sets children. * * @param Equipment $children * * @return $this */ public function setChildren(Equipment $children) { $this->children = $children; return $this; } /** * Gets children. * * @return Equipment */ public function getChildren() { return $this->children; } /** * Sets quantity. * * @param int $quantity * * @return $this */ public function setQuantity($quantity) { $this->quantity = intval($quantity); return $this; } /** * Gets quantity. * * @return int */ public function getQuantity() { return $this->quantity; } /** * Gets full label. * * @return array */ public function getFullLabelTemplate() { $children = $this->getChildren(); if(empty($children)) return []; return [ ['value' => $children->getEquipmentList() ? $children->getEquipmentList()->getFamilly() : '', 'translate' => true], $children->getBrand(), $children->getModel() ]; } }