baseId = (int) $baseId; $this->databoxId = (int) $databoxId; $this->collectionId = (int) $collectionId; $this->displayIndex = (int) $displayIndex; $this->isActive = (bool) $isActive; $this->alias = (string) $alias; } /** * @return int */ public function getDataboxId() { return $this->databoxId; } /** * @return int */ public function getBaseId() { return $this->baseId; } /** * @param int $baseId */ public function setBaseId($baseId) { if ($this->baseId > 0) { throw new \LogicException('Cannot change the baseId of an existing collection reference.'); } $this->baseId = $baseId; } /** * @return int */ public function getCollectionId() { return $this->collectionId; } /** * @return int */ public function getDisplayIndex() { return $this->displayIndex; } /** * @param int $index * @return $this */ public function setDisplayIndex($index) { $this->displayIndex = (int) $index; return $this; } /** * @return boolean */ public function isActive() { return $this->isActive; } /** * @return $this */ public function disable() { $this->isActive = false; return $this; } /** * @return $this */ public function enable() { $this->isActive = true; return $this; } /** * @return string */ public function getAlias() { return $this->alias; } /** * @param string $alias * @return $this */ public function setAlias($alias) { $this->alias = (string) $alias; return $this; } }