/** * * Generates a data array that will be passed to the typoscript object for * rendering the icon. * @param \Mittwald\Typo3Forum\Domain\Model\Forum\Topic $topic * The topic for which the icon is to be displayed. * @return array The data array for the typoscript object. * */ protected function getDataArray(\Mittwald\Typo3Forum\Domain\Model\Forum\Topic $topic = NULL) { if ($topic === NULL) { return array(); } elseif ($topic instanceof \Mittwald\Typo3Forum\Domain\Model\Forum\ShadowTopic) { return array('moved' => TRUE); } else { return array('important' => $topic->getPostCount() >= $this->arguments['important'], 'new' => !$topic->hasBeenReadByUser($this->frontendUserRepository->findCurrent()), 'closed' => $topic->isClosed(), 'sticky' => $topic->isSticky(), 'solved' => $topic->getIsSolved()); } }