function skinTypes_PageDidLoad($page, $parameters) { $skinTypes = WFSkin::installedSkinTypes(); $page->assign('skinTypes', $skinTypes); $skin = WFRequestController::sharedSkin(); if (!empty($parameters['skinTypeName'])) { $skin->setDelegateName($parameters['skinTypeName']); } $page->assign('currentSkinType', $skin->delegateName()); // show the info for the current skin delegate $contentInfo = array(); foreach ($skin->namedContentList() as $contentName) { $contentInfo[$contentName] = print_r($skin->namedContent($contentName), true); } // get skin list for current skin type $skins = $skin->installedSkins(); $page->assign('skins', $skins); $page->assign('namedContentInfo', $contentInfo); $page->assign('skinDelegateClassName', get_class($skin->valueForKey('delegate'))); }
function skinTypes_PageDidLoad($page, $parameters) { $skinTypes = WFSkin::installedSkinTypes(); $page->assign('skinTypes', $skinTypes); $skin = $this->invocation->rootSkin(); try { if (!empty($parameters['skinTypeName'])) { $skin->setDelegateName($parameters['skinTypeName']); } } catch (Exception $e) { throw new WFRequestController_NotFoundException($e->getMessage()); } $page->assign('currentSkinType', $skin->delegateName()); // show the info for the current skin delegate $contentInfo = array(); foreach ($skin->namedContentList() as $contentName) { $contentInfo[$contentName] = print_r($skin->namedContent($contentName), true); } // get skin list for current skin type $skins = $skin->installedSkins(); $page->assign('skins', $skins); $page->assign('namedContentInfo', $contentInfo); $page->assign('skinDelegateClassName', get_class($skin->valueForKey('delegate'))); }