*/ namespace oat\taoOutcomeUi\model; use oat\oatbox\service\ConfigurableService; class ResultsViewerService extends ConfigurableService { const SERVICE_ID = 'taoOutcomeUi/resultsViewer'; const OPTION_DEFAULT_ITEM_TYPE = 'defaultItemType'; /** * Sets the default item type the viewer should manage * @param string $type */ public function setDefaultItemType($type) { $this->setOption(self::OPTION_DEFAULT_ITEM_TYPE, $type); } /** * Gets the default item type the viewer should manage * @return string */ public function getDefaultItemType() { if ($this->hasOption(self::OPTION_DEFAULT_ITEM_TYPE)) { return $this->getOption(self::OPTION_DEFAULT_ITEM_TYPE); } return false; } /** * Gets the type of item the viewer should manage * @todo determine the item type from the $resultIdentifier * @param string $resultIdentifier * @return string */ public function getDeliveryItemType($resultIdentifier) { return $this->getDefaultItemType(); } }