id = $id; return $this; } /** * Get the id of the subcategory. * @return string */ public function getId() { return $this->id; } /** * Get the specifed categoryId see {@link $categoryId}. * * @return string */ public function getCategoryId() { return $this->categoryId; } /** * Sets (overwrites) the categoryId see {@link $categoryId}. * * @param string $categoryId * @return static */ public function setCategoryId($categoryId) { $this->categoryId = $categoryId; return $this; } /** * Sets (overwrites) the name see {@link $name} and {@link $id}. * * @param string $name A translation key eg 'General_Overview'. * @return static */ public function setName($name) { $this->name = $name; return $this; } /** * Get the name of the subcategory. * @return string */ public function getName() { if (!empty($this->name)) { return $this->name; } return $this->id; } /** * Sets (overwrites) the order see {@link $order}. * * @param int $order * @return static */ public function setOrder($order) { $this->order = (int) $order; return $this; } /** * Get the order of the subcategory. * @return int */ public function getOrder() { return $this->order; } }