function generateTags($sessionId, $zoneId, $codeType, $aParams, &$generatedTag) { if ($this->verifySession($sessionId)) { $result = $this->_dllZone->generateTags($zoneId, $codeType, $aParams); if ($this->_validateResult($result)) { $generatedTag = $result; return true; } } return false; }
function testGetAllowedTags() { TestEnv::installPluginPackage('openXInvocationTags'); $dllZone = new OA_Dll_Zone(); $aZoneAllowedTags = $dllZone->getAllowedTags(); // Test if only and all allowed tags are returned $count = 0; $invocationTags =& OX_Component::getComponents('invocationTags'); foreach ($invocationTags as $pluginKey => $invocationTag) { if ($invocationTag->isAllowed(null, null)) { $count++; $this->assertTrue(in_array($pluginKey, $aZoneAllowedTags)); } else { $this->assertFalse(in_array($pluginKey, $aZoneAllowedTags)); } } $this->assertEqual($count, count($aZoneAllowedTags)); // tests if spc is disallowed anyway $GLOBALS['_MAX']['CONF']['spc']['allowed'] = true; $aZoneAllowedTags = $dllZone->getAllowedTags(); $this->assertFalse(in_array('spc', $aZoneAllowedTags)); unset($GLOBALS['_MAX']['CONF']['spc']['allowed']); TestEnv::uninstallPluginPackage('openXInvocationTags'); }