stepconf = $stepconf; $this->setPid($stepconf->getPid()); } /** * Returns the stepconf this rating is part of * * @return \WapplerSystems\BookmarksLikesRatings\Domain\Model\Stepconf The stepconf this rating is part of */ public function getStepconf(): Stepconf { return $this->stepconf; } /** * Sets the stepconfig name * * @param string $stepname */ public function setStepname($stepname): void { $this->stepname = $stepname; } /** * Gets the stepconfig name * If not set stepweight is copied * * @return string Stepconfig name */ public function getStepname(): string { $value = $this->stepname; if (stripos($value, 'LLL:') === 0) { $value = 'stepnames.' . substr($value, 4); $value = LocalizationUtility::translate($value, 'ThRating'); } if (empty($value)) { $value = (string)$this->getStepconf()->getSteporder(); } return $value; } /** * @return int */ /** @noinspection PhpUnused */ public function getL18nParent(): int { return $this->l18nParent; } /** * @param int $l18nParent */ public function setL18nParent($l18nParent): void { $this->l18nParent = $l18nParent; } /** * Get sys language * * @return int */ public function getSysLanguageUid(): int { return $this->_languageUid; } /** * Set sys language * * @param int $sysLanguageUid language uid */ public function setSysLanguageUid($sysLanguageUid): void { $this->_languageUid = $sysLanguageUid; } /** * @return bool */ public function isValid(): bool { return !empty($this->stepconf); } /** * Method to use Object as plain string * * @return string */ public function __toString(): string { return $this->getStepname(); } }