How to use run method of search class

Best Phoronix-test-suite code snippet using search.run

%%C2^C2A^C2A39EC5%%SitesManager.tpl.php

Source:%%C2^C2A^C2A39EC5%%SitesManager.tpl.php Github

copy

Full Screen

...8unset($_smarty_tpl_vars);9 ?>10<?php echo smarty_function_loadJavascriptTranslations(array('plugins' => 'SitesManager'), $this);?>11<script type="text/javascript">12<?php ob_start(); ?><?php echo ((is_array($_tmp='SitesManager_HelpExcludedIps')) ? $this->_run_mod_handler('translate', true, $_tmp, "1.2.3.*", "1.2.*.*") : smarty_modifier_translate($_tmp, "1.2.3.*", "1.2.*.*")); ?>13<br /><br /> <?php echo ((is_array($_tmp='SitesManager_YourCurrentIpAddressIs')) ? $this->_run_mod_handler('translate', true, $_tmp, "<i>".($this->_tpl_vars['currentIpAddress'])."</i>") : smarty_modifier_translate($_tmp, "<i>".($this->_tpl_vars['currentIpAddress'])."</i>")); ?>14<?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('excludedIpHelpPlain', ob_get_contents());ob_end_clean(); ?>15<?php $this->assign('excludedIpHelp', ((is_array($_tmp=$this->_tpl_vars['excludedIpHelpPlain'])) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp))); ?>16var excludedIpHelp = '<?php echo ((is_array($_tmp=$this->_tpl_vars['excludedIpHelp'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>17';18var aliasUrlsHelp = '<?php echo ((is_array($_tmp=((is_array($_tmp=((is_array($_tmp='SitesManager_AliasUrlHelp')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)))) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>19';20<?php ob_start(); ?>21 <?php if ($this->_tpl_vars['timezoneSupported']): ?>22 <?php echo ((is_array($_tmp='SitesManager_ChooseCityInSameTimezoneAsYou')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>23 <?php else: ?>24 <?php echo ((is_array($_tmp='SitesManager_AdvancedTimezoneSupportNotFound')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>25 <?php endif; ?> <br /><br /><?php echo ((is_array($_tmp='SitesManager_UTCTimeIs')) ? $this->_run_mod_handler('translate', true, $_tmp, $this->_tpl_vars['utcTime']) : smarty_modifier_translate($_tmp, $this->_tpl_vars['utcTime'])); ?>26<?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('defaultTimezoneHelpPlain', ob_get_contents());ob_end_clean(); ?>27<?php ob_start(); ?>28 <?php echo $this->_tpl_vars['defaultTimezoneHelpPlain']; ?>29 <br /><br /><?php echo ((is_array($_tmp='SitesManager_ChangingYourTimezoneWillOnlyAffectDataForward')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>30<?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('timezoneHelpPlain', ob_get_contents());ob_end_clean(); ?>31<?php ob_start(); ?>32 <?php echo ((is_array($_tmp=((is_array($_tmp='SitesManager_CurrencySymbolWillBeUsedForGoals')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)))) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp)); ?>33<?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('currencyHelpPlain', ob_get_contents());ob_end_clean(); ?>34<?php ob_start(); ?>35 <?php echo ((is_array($_tmp='SitesManager_EcommerceHelp')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>36 <br />37 <?php echo ((is_array($_tmp='SitesManager_PiwikOffersEcommerceAnalytics')) ? $this->_run_mod_handler('translate', true, $_tmp, "<a href='http://piwik.org/docs/ecommerce-analytics/' target='_blank'>", "</a>") : smarty_modifier_translate($_tmp, "<a href='http://piwik.org/docs/ecommerce-analytics/' target='_blank'>", "</a>")); ?>38<?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('ecommerceHelpPlain', ob_get_contents());ob_end_clean(); ?>39<?php ob_start(); ?>40 <?php echo ((is_array($_tmp='SitesManager_ListOfQueryParametersToExclude')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>41 <br /><br />42 <?php echo ((is_array($_tmp='SitesManager_PiwikWillAutomaticallyExcludeCommonSessionParameters')) ? $this->_run_mod_handler('translate', true, $_tmp, "phpsessid, sessionid, ...") : smarty_modifier_translate($_tmp, "phpsessid, sessionid, ...")); ?>43<?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('excludedQueryParametersHelp', ob_get_contents());ob_end_clean(); ?>44<?php $this->assign('excludedQueryParametersHelp', ((is_array($_tmp=$this->_tpl_vars['excludedQueryParametersHelp'])) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp))); ?>45<?php ob_start(); ?>46 <?php echo ((is_array($_tmp='SitesManager_GlobalExcludedUserAgentHelp1')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>47 <br/><br/>48 <?php echo ((is_array($_tmp='SitesManager_GlobalListExcludedUserAgents_Desc')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>49 <?php echo ((is_array($_tmp='SitesManager_GlobalExcludedUserAgentHelp2')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>50<?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('excludedUserAgentsHelp', ob_get_contents());ob_end_clean(); ?>51<?php $this->assign('excludedUserAgentsHelp', ((is_array($_tmp=$this->_tpl_vars['excludedUserAgentsHelp'])) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp))); ?>52var excludedQueryParametersHelp = '<?php echo ((is_array($_tmp=$this->_tpl_vars['excludedQueryParametersHelp'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>53';54var excludedUserAgentsHelp = '<?php echo ((is_array($_tmp=$this->_tpl_vars['excludedUserAgentsHelp'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>55';56var timezoneHelp = '<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['timezoneHelpPlain'])) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>57';58var currencyHelp = '<?php echo ((is_array($_tmp=$this->_tpl_vars['currencyHelpPlain'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>59';60var ecommerceHelp = '<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['ecommerceHelpPlain'])) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>61';62var ecommerceEnabled = '<?php echo ((is_array($_tmp=((is_array($_tmp='SitesManager_EnableEcommerce')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>63';64var ecommerceDisabled = '<?php echo ((is_array($_tmp=((is_array($_tmp='SitesManager_NotAnEcommerceSite')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>65';66<?php $this->assign('defaultTimezoneHelp', ((is_array($_tmp=$this->_tpl_vars['defaultTimezoneHelpPlain'])) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp))); ?>67<?php $this->assign('searchKeywordHelp', ((is_array($_tmp=((is_array($_tmp='SitesManager_SearchKeywordParametersDesc')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)))) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp))); ?>68<?php ob_start(); ?><?php echo ((is_array($_tmp='Goals_Optional')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>69 <?php echo ((is_array($_tmp='SitesManager_SearchCategoryParametersDesc')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>70<?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('searchCategoryHelpText', ob_get_contents());ob_end_clean(); ?>71<?php $this->assign('searchCategoryHelp', ((is_array($_tmp=$this->_tpl_vars['searchCategoryHelpText'])) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp))); ?>72var sitesearchEnabled = '<?php echo ((is_array($_tmp=((is_array($_tmp='SitesManager_EnableSiteSearch')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>73';74var sitesearchDisabled = '<?php echo ((is_array($_tmp=((is_array($_tmp='SitesManager_DisableSiteSearch')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>75';76var searchKeywordHelp = '<?php echo ((is_array($_tmp=$this->_tpl_vars['searchKeywordHelp'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>77';78var searchCategoryHelp = '<?php echo ((is_array($_tmp=$this->_tpl_vars['searchCategoryHelp'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>79';80var sitesearchDesc = '<?php echo ((is_array($_tmp=((is_array($_tmp='SitesManager_TrackingSiteSearch')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>81';82var sitesManager = new SitesManager ( <?php echo $this->_tpl_vars['timezones']; ?>83, <?php echo $this->_tpl_vars['currencies']; ?>84, '<?php echo $this->_tpl_vars['defaultTimezone']; ?>85', '<?php echo $this->_tpl_vars['defaultCurrency']; ?>86');87<?php $this->assign('searchKeywordLabel', ((is_array($_tmp='SitesManager_SearchKeywordLabel')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp))); ?>88<?php $this->assign('searchCategoryLabel', ((is_array($_tmp='SitesManager_SearchCategoryLabel')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp))); ?>89var searchKeywordLabel = '<?php echo ((is_array($_tmp=$this->_tpl_vars['searchKeywordLabel'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>90';91var searchCategoryLabel = '<?php echo ((is_array($_tmp=$this->_tpl_vars['searchCategoryLabel'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>92';93<?php $this->assign('sitesearchIntro', ((is_array($_tmp='SitesManager_SiteSearchUse')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp))); ?>94var sitesearchIntro = '<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['sitesearchIntro'])) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp)))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>95';96var sitesearchUseDefault = '<?php if ($this->_tpl_vars['isSuperUser']): ?><?php echo ((is_array($_tmp=((is_array($_tmp='SitesManager_SearchUseDefault')) ? $this->_run_mod_handler('translate', true, $_tmp, '<a href="#globalSiteSearch">', '</a>') : smarty_modifier_translate($_tmp, '<a href="#globalSiteSearch">', '</a>')))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>97<?php else: ?><?php echo ((is_array($_tmp=((is_array($_tmp='SitesManager_SearchUseDefault')) ? $this->_run_mod_handler('translate', true, $_tmp, '', '') : smarty_modifier_translate($_tmp, '', '')))) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>98<?php endif; ?>';99var strDefault = '<?php echo ((is_array($_tmp='General_Default')) ? $this->_run_mod_handler('translate', true, $_tmp, 'escape', 'javascript') : smarty_modifier_translate($_tmp, 'escape', 'javascript')); ?>100';101<?php echo '102$(document).ready( function() {103 sitesManager.init();104});105</script>106<style type="text/css">107.entityTable tr td {108 vertical-align: top;109 padding-top:7px;110}111.addRowSite:hover, .editableSite:hover, .addsite:hover, .cancel:hover, .deleteSite:hover, .editSite:hover, .updateSite:hover{112 cursor: pointer;113}114.addRowSite a {115 text-decoration: none;116}117.addRowSite {118 padding:1em;119 font-weight:bold;120}121#editSites {122 vertical-align: top;123}124option, select {125 font-size:11px;126}127textarea {128font-size:9pt;129}130.admin thead th {131vertical-align:middle;132}133.ecommerceInactive,.sitesearchInactive {134 color: #666666;135}136#searchSiteParameters {137 display:none;138}139</style>140'; ?>141<h2><?php echo ((is_array($_tmp='SitesManager_WebsitesManagement')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>142</h2>143<p><?php echo ((is_array($_tmp='SitesManager_MainDescription')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>144<?php echo ((is_array($_tmp='SitesManager_YouCurrentlyHaveAccessToNWebsites')) ? $this->_run_mod_handler('translate', true, $_tmp, "<b>".($this->_tpl_vars['adminSitesCount'])."</b>") : smarty_modifier_translate($_tmp, "<b>".($this->_tpl_vars['adminSitesCount'])."</b>")); ?>145<?php if ($this->_tpl_vars['isSuperUser']): ?>146<br /><?php echo ((is_array($_tmp='SitesManager_SuperUserCan')) ? $this->_run_mod_handler('translate', true, $_tmp, "<a href='#globalSettings'>", "</a>") : smarty_modifier_translate($_tmp, "<a href='#globalSettings'>", "</a>")); ?>147<?php endif; ?>148</p>149<?php echo smarty_function_ajaxErrorDiv(array(), $this);?>150<?php echo smarty_function_ajaxLoadingDiv(array(), $this);?>151<?php ob_start(); ?>152 <div class="addRowSite"><img src='plugins/UsersManager/images/add.png' alt="" /> <?php echo ((is_array($_tmp='SitesManager_AddSite')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>153</div>154<?php $this->_smarty_vars['capture']['default'] = ob_get_contents(); $this->assign('createNewWebsite', ob_get_contents());ob_end_clean(); ?>155<?php if (count($this->_tpl_vars['adminSites']) == 0): ?>156 <?php echo ((is_array($_tmp='SitesManager_NoWebsites')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>157<?php else: ?>158 <div class="ui-confirm" id="confirm">159 <h2></h2>160 <input role="yes" type="button" value="<?php echo ((is_array($_tmp='General_Yes')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>161" />162 <input role="no" type="button" value="<?php echo ((is_array($_tmp='General_No')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>163" />164 </div>165 <div class="entityContainer">166 <?php if ($this->_tpl_vars['isSuperUser']): ?> 167 <?php echo $this->_tpl_vars['createNewWebsite']; ?>168 169 <?php endif; ?>170 <table class="entityTable dataTable" id="editSites">171 <thead>172 <tr>173 <th><?php echo ((is_array($_tmp='General_Id')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>174</th>175 <th><?php echo ((is_array($_tmp='General_Name')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>176</th>177 <th><?php echo ((is_array($_tmp='SitesManager_Urls')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>178</th>179 <th><?php echo ((is_array($_tmp='SitesManager_ExcludedIps')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>180</th>181 <th><?php echo ((is_array($_tmp=((is_array($_tmp='SitesManager_ExcludedParameters')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)))) ? $this->_run_mod_handler('replace', true, $_tmp, ' ', "<br />") : smarty_modifier_replace($_tmp, ' ', "<br />")); ?>182</th>183 <th id='exclude-user-agent-header' <?php if (! $this->_tpl_vars['allowSiteSpecificUserAgentExclude']): ?>style="display:none"<?php endif; ?>><?php echo ((is_array($_tmp='SitesManager_ExcludedUserAgents')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>184</th>185 <th><?php echo ((is_array($_tmp='Actions_SubmenuSitesearch')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>186</th>187 <th><?php echo ((is_array($_tmp='SitesManager_Timezone')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>188</th>189 <th><?php echo ((is_array($_tmp='SitesManager_Currency')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>190</th>191 <th><?php echo ((is_array($_tmp='Goals_Ecommerce')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>192</th>193 <th> </th>194 <th> </th>195 <th> <?php echo ((is_array($_tmp='SitesManager_JsTrackingTag')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>196 </th>197 </tr>198 </thead>199 <tbody>200 <?php $_from = $this->_tpl_vars['adminSites']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):201 foreach ($_from as $this->_tpl_vars['i'] => $this->_tpl_vars['site']):202?>203 <tr id="row<?php echo $this->_tpl_vars['site']['idsite']; ?>204">205 <td id="idSite"><?php echo $this->_tpl_vars['site']['idsite']; ?>206</td>207 <td id="siteName" class="editableSite"><?php echo $this->_tpl_vars['site']['name']; ?>208</td>209 <td id="urls" class="editableSite"><?php $_from = $this->_tpl_vars['site']['alias_urls']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):210 foreach ($_from as $this->_tpl_vars['url']):211?><?php echo ((is_array($_tmp=$this->_tpl_vars['url'])) ? $this->_run_mod_handler('replace', true, $_tmp, "http://", "") : smarty_modifier_replace($_tmp, "http://", "")); ?>212<br /><?php endforeach; endif; unset($_from); ?></td> 213 <td id="excludedIps" class="editableSite"><?php $_from = $this->_tpl_vars['site']['excluded_ips']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):214 foreach ($_from as $this->_tpl_vars['ip']):215?><?php echo $this->_tpl_vars['ip']; ?>216<br /><?php endforeach; endif; unset($_from); ?></td> 217 <td id="excludedQueryParameters" class="editableSite"><?php $_from = $this->_tpl_vars['site']['excluded_parameters']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):218 foreach ($_from as $this->_tpl_vars['parameter']):219?><?php echo $this->_tpl_vars['parameter']; ?>220<br /><?php endforeach; endif; unset($_from); ?></td>221 <td id="excludedUserAgents" class="editableSite" <?php if (! $this->_tpl_vars['allowSiteSpecificUserAgentExclude']): ?>style="display:none"<?php endif; ?>><?php $_from = $this->_tpl_vars['site']['excluded_user_agents']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):222 foreach ($_from as $this->_tpl_vars['ua']):223?><?php echo $this->_tpl_vars['ua']; ?>224<br /><?php endforeach; endif; unset($_from); ?></td>225 <td id="sitesearch" class="editableSite"><?php if ($this->_tpl_vars['site']['sitesearch']): ?><span class='sitesearchActive'><?php echo ((is_array($_tmp='General_Yes')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>226</span><?php else: ?><span class='sitesearchInactive'>-</span><?php endif; ?><span class='sskp' sitesearch_keyword_parameters="<?php echo ((is_array($_tmp=$this->_tpl_vars['site']['sitesearch_keyword_parameters'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>227" sitesearch_category_parameters="<?php echo ((is_array($_tmp=$this->_tpl_vars['site']['sitesearch_category_parameters'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>228" id="sitesearch_parameters"></span></td>229 <td id="timezone" class="editableSite"><?php echo $this->_tpl_vars['site']['timezone']; ?>230</td>231 <td id="currency" class="editableSite"><?php echo $this->_tpl_vars['site']['currency']; ?>232</td>233 <td id="ecommerce" class="editableSite"><?php if ($this->_tpl_vars['site']['ecommerce']): ?><span class='ecommerceActive'><?php echo ((is_array($_tmp='General_Yes')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>234</span><?php else: ?><span class='ecommerceInactive'>-</span><?php endif; ?></td>235 <td><span id="row<?php echo $this->_tpl_vars['site']['idsite']; ?>236" class='editSite link_but'><img src='themes/default/images/ico_edit.png' title="<?php echo ((is_array($_tmp='General_Edit')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>237" border="0"/> <?php echo ((is_array($_tmp='General_Edit')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>238</span></td>239 <td><span id="row<?php echo $this->_tpl_vars['site']['idsite']; ?>240" class="deleteSite link_but"><img src='themes/default/images/ico_delete.png' title="<?php echo ((is_array($_tmp='General_Delete')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>241" border="0" /> <?php echo ((is_array($_tmp='General_Delete')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>242</span></td>243 <td><a href='<?php echo smarty_function_url(array('action' => 'displayJavascriptCode','idSite' => $this->_tpl_vars['site']['idsite'],'updated' => false), $this);?>244'><?php echo ((is_array($_tmp='SitesManager_ShowTrackingTag')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>245</a></td>246 </tr>247 <?php endforeach; endif; unset($_from); ?>248 </tbody>249 </table>250 <?php if ($this->_tpl_vars['isSuperUser']): ?> 251 <?php echo $this->_tpl_vars['createNewWebsite']; ?>252 253 <?php endif; ?>254 </div>255<?php endif; ?>256<?php if (! $this->_tpl_vars['isSuperUser']): ?>257<input type="hidden" size="15" id="globalSearchKeywordParameters" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['globalSearchKeywordParameters'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>258"></input>259<input type="hidden" size="15" id="globalSearchCategoryParameters" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['globalSearchCategoryParameters'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>260"></input>261<?php endif; ?>262<?php if ($this->_tpl_vars['isSuperUser']): ?>263<br />264 <a name='globalSettings'></a>265 <h2><?php echo ((is_array($_tmp='SitesManager_GlobalWebsitesSettings')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>266</h2>267 <br />268 <table style='width:600px' class="adminTable" >269 270 <tr><td colspan="2">271 <b><?php echo ((is_array($_tmp='SitesManager_GlobalListExcludedIps')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>272</b>273 <p><?php echo ((is_array($_tmp='SitesManager_ListOfIpsToBeExcludedOnAllWebsites')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>274 </p>275 </td></tr>276 <tr><td>277 <textarea cols="30" rows="3" id="globalExcludedIps"><?php echo $this->_tpl_vars['globalExcludedIps']; ?>278</textarea>279 </td><td>280 <label for="globalExcludedIps"><?php echo $this->_tpl_vars['excludedIpHelp']; ?>281</label>282 </td></tr>283 <tr><td colspan="2">284 <b><?php echo ((is_array($_tmp='SitesManager_GlobalListExcludedQueryParameters')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>285</b>286 <p><?php echo ((is_array($_tmp='SitesManager_ListOfQueryParametersToBeExcludedOnAllWebsites')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>287 </p>288 </td></tr>289 <tr><td>290 <textarea cols="30" rows="3" id="globalExcludedQueryParameters"><?php echo $this->_tpl_vars['globalExcludedQueryParameters']; ?>291</textarea>292 </td><td><label for="globalExcludedQueryParameters"><?php echo $this->_tpl_vars['excludedQueryParametersHelp']; ?>293</label>294 </td></tr>295 296 <tr><td colspan="2">297 <b><?php echo ((is_array($_tmp='SitesManager_GlobalListExcludedUserAgents')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>298</b>299 <p><?php echo ((is_array($_tmp='SitesManager_GlobalListExcludedUserAgents_Desc')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>300</p>301 </td></tr>302 303 <tr><td>304 <textarea cols="30" rows="3" id="globalExcludedUserAgents"><?php echo $this->_tpl_vars['globalExcludedUserAgents']; ?>305</textarea>306 </td><td><label for="globalExcludedUserAgents"><?php echo $this->_tpl_vars['excludedUserAgentsHelp']; ?>307</label>308 </td></tr>309 310 <tr><td>311 <input type="checkbox" id="enableSiteUserAgentExclude" name="enableSiteUserAgentExclude" <?php if ($this->_tpl_vars['allowSiteSpecificUserAgentExclude']): ?>checked="checked"<?php endif; ?>/><label for="enableSiteUserAgentExclude"><?php echo ((is_array($_tmp='SitesManager_EnableSiteSpecificUserAgentExclude')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>312</label>313 <span id='enableSiteUserAgentExclude-loading' class='loadingPiwik' style='display:none'><img src='./themes/default/images/loading-blue.gif' /></span>314 </td><td><?php echo ((is_array($_tmp=((is_array($_tmp='SitesManager_EnableSiteSpecificUserAgentExclude_Help')) ? $this->_run_mod_handler('translate', true, $_tmp, '<a href="#editSites">', '</a>') : smarty_modifier_translate($_tmp, '<a href="#editSites">', '</a>')))) ? $this->_run_mod_handler('inlineHelp', true, $_tmp) : smarty_modifier_inlineHelp($_tmp)); ?>315 </td></tr>316 <tr><td colspan="2">317 <a name='globalSiteSearch'></a><b><?php echo ((is_array($_tmp='SitesManager_TrackingSiteSearch')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>318</b>319 <p><?php echo $this->_tpl_vars['sitesearchIntro']; ?>320</p>321 <span class="form-description" style='font-size:8pt'><?php echo ((is_array($_tmp='SitesManager_SearchParametersNote')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>322 <?php echo ((is_array($_tmp='SitesManager_SearchParametersNote2')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>323</span>324 </td></tr>325 <tr><td colspan="2">326 <label><?php echo $this->_tpl_vars['searchKeywordLabel']; ?>327 &nbsp;<input type="text" size="15" id="globalSearchKeywordParameters" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['globalSearchKeywordParameters'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>328"></input>329 <div style='width: 200px;float:right;'><?php echo $this->_tpl_vars['searchKeywordHelp']; ?>330</div></label>331 </td></tr>332 <tr><td colspan="2">333 <?php if (! $this->_tpl_vars['isSearchCategoryTrackingEnabled']): ?>334 <input value='globalSearchCategoryParametersIsDisabled' id="globalSearchCategoryParameters" type='hidden'></input>335 <span class='form-description'>Note: you could also track your Internal Search Engine Categories, but the plugin Custom Variables is required. Please enable the plugin CustomVariables (or ask your Piwik admin).</span>336 <?php else: ?>337 <?php echo ((is_array($_tmp='Goals_Optional')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>338 <?php echo ((is_array($_tmp='SitesManager_SearchCategoryDesc')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>339 <br/>340 </td></tr>341 <tr><td colspan="2">342 <label><?php echo $this->_tpl_vars['searchCategoryLabel']; ?>343 &nbsp;<input type="text" size="15" id="globalSearchCategoryParameters" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['globalSearchCategoryParameters'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'html') : smarty_modifier_escape($_tmp, 'html')); ?>344"></input>345 <div style='width: 200px;float:right;'><?php echo $this->_tpl_vars['searchCategoryHelp']; ?>346</div></label>347 <?php endif; ?>348 </td></tr>349 <tr><td colspan="2">350 <b><?php echo ((is_array($_tmp='SitesManager_DefaultTimezoneForNewWebsites')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>351</b>352 <p><?php echo ((is_array($_tmp='SitesManager_SelectDefaultTimezone')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>353 </p>354 </td></tr>355 <tr><td>356 <div id='defaultTimezone'></div>357 </td><td>358 <?php echo $this->_tpl_vars['defaultTimezoneHelp']; ?>359 </td></tr>360 361 <tr><td colspan="2">362 <b><?php echo ((is_array($_tmp='SitesManager_DefaultCurrencyForNewWebsites')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>363</b>364 <p><?php echo ((is_array($_tmp='SitesManager_SelectDefaultCurrency')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>365 </p>366 </td></tr>367 <tr><td>368 <div id='defaultCurrency'></div>369 </td><td>370 <?php echo $this->_tpl_vars['currencyHelpPlain']; ?>371 </td></tr>372 </table>373 <span style='margin-left:20px'>374 <input type="submit" class="submit" id='globalSettingsSubmit' value="<?php echo ((is_array($_tmp='General_Save')) ? $this->_run_mod_handler('translate', true, $_tmp) : smarty_modifier_translate($_tmp)); ?>375" />376 </span>377 <?php echo smarty_function_ajaxErrorDiv(array('id' => 'ajaxErrorGlobalSettings'), $this);?>378 <?php echo smarty_function_ajaxLoadingDiv(array('id' => 'ajaxLoadingGlobalSettings'), $this);?>379<?php endif; ?>380<?php if ($this->_tpl_vars['showAddSite']): ?>381<script type="text/javascript"><?php echo '382$(document).ready(function(){383 $(\'.addRowSite:first\').trigger(\'click\');384});385'; ?>386</script>387<?php endif; ?>388<br /><br /><br /><br />...

Full Screen

Full Screen

Run.php

Source:Run.php Github

copy

Full Screen

...25 'perPage' => $this->_app->config('page.limit'),26 'conditions' => $search,27 'projection' => true,28 ));29 $title = 'Recent runs';30 $titleMap = array(31 'wt' => 'Longest wall time',32 'cpu' => 'Most CPU time',33 'mu' => 'Highest memory use',34 );35 if (isset($titleMap[$sort])) {36 $title = $titleMap[$sort];37 }38 $paging = array(39 'total_pages' => $result['totalPages'],40 'page' => $result['page'],41 'sort' => $sort,42 'direction' => $result['direction']43 );44 $this->_template = 'runs/list.twig';45 $this->set(array(46 'paging' => $paging,47 'base_url' => 'home',48 'runs' => $result['results'],49 'date_format' => $this->_app->config('date.format'),50 'search' => $search,51 'has_search' => strlen(implode('', $search)) > 0,52 'title' => $title53 ));54 }55 public function view()56 {57 $request = $this->_app->request();58 $detailCount = $this->_app->config('detail.count');59 $result = $this->_profiles->get($request->get('id'));60 $result->calculateSelf();61 // Self wall time graph62 $timeChart = $result->extractDimension('ewt', $detailCount);63 // Memory Block64 $memoryChart = $result->extractDimension('emu', $detailCount);65 // Watched Functions Block66 $watchedFunctions = array();67 foreach ($this->_watches->getAll() as $watch) {68 $matches = $result->getWatched($watch['name']);69 if ($matches) {70 $watchedFunctions = array_merge($watchedFunctions, $matches);71 }72 }73 $profile = $result->sort('ewt', $result->getProfile());74 $this->_template = 'runs/view.twig';75 $this->set(array(76 'profile' => $profile,77 'result' => $result,78 'wall_time' => $timeChart,79 'memory' => $memoryChart,80 'watches' => $watchedFunctions,81 'date_format' => $this->_app->config('date.format'),82 ));83 }84 public function url()85 {86 $request = $this->_app->request();87 $pagination = array(88 'sort' => $request->get('sort'),89 'direction' => $request->get('direction'),90 'page' => $request->get('page'),91 'perPage' => $this->_app->config('page.limit'),92 );93 $search = array();94 $keys = array('date_start', 'date_end', 'limit', 'limit_custom');95 foreach ($keys as $key) {96 $search[$key] = $request->get($key);97 }98 $runs = $this->_profiles->getForUrl(99 $request->get('url'),100 $pagination,101 $search102 );103 if (isset($search['limit_custom']) && strlen($search['limit_custom']) > 0 && $search['limit_custom'][0] == 'P') {104 $search['limit'] = $search['limit_custom'];105 }106 $chartData = $this->_profiles->getPercentileForUrl(107 90,108 $request->get('url'),109 $search110 );111 $paging = array(112 'total_pages' => $runs['totalPages'],113 'sort' => $pagination['sort'],114 'page' => $runs['page'],115 'direction' => $runs['direction']116 );117 $this->_template = 'runs/url.twig';118 $this->set(array(119 'paging' => $paging,120 'base_url' => 'url.view',121 'runs' => $runs['results'],122 'url' => $request->get('url'),123 'chart_data' => $chartData,124 'date_format' => $this->_app->config('date.format'),125 'search' => array_merge($search, array('url' => $request->get('url'))),126 ));127 }128 public function compare()129 {130 $request = $this->_app->request();131 $baseRun = $headRun = $candidates = $comparison = null;132 $paging = array();133 if ($request->get('base')) {134 $baseRun = $this->_profiles->get($request->get('base'));135 }136 if ($baseRun && !$request->get('head')) {137 $pagination = array(138 'direction' => $request->get('direction'),139 'sort' => $request->get('sort'),140 'page' => $request->get('page'),141 'perPage' => $this->_app->config('page.limit'),142 );143 $candidates = $this->_profiles->getForUrl(144 $baseRun->getMeta('simple_url'),145 $pagination146 );147 $paging = array(148 'total_pages' => $candidates['totalPages'],149 'sort' => $pagination['sort'],150 'page' => $candidates['page'],151 'direction' => $candidates['direction']152 );153 }154 if ($request->get('head')) {155 $headRun = $this->_profiles->get($request->get('head'));156 }157 if ($baseRun && $headRun) {158 $comparison = $baseRun->compare($headRun);159 }160 $this->_template = 'runs/compare.twig';161 $this->set(array(162 'base_url' => 'run.compare',163 'base_run' => $baseRun,164 'head_run' => $headRun,165 'candidates' => $candidates,166 'url_params' => $request->get(),167 'date_format' => $this->_app->config('date.format'),168 'comparison' => $comparison,169 'paging' => $paging,170 'search' => array(171 'base' => $request->get('base'),172 'head' => $request->get('head'),173 )174 ));175 }176 public function symbol()177 {178 $request = $this->_app->request();179 $id = $request->get('id');180 $symbol = $request->get('symbol');181 $profile = $this->_profiles->get($id);182 $profile->calculateSelf();183 list($parents, $current, $children) = $profile->getRelatives($symbol);184 $this->_template = 'runs/symbol.twig';185 $this->set(array(186 'symbol' => $symbol,187 'id' => $id,188 'main' => $profile->get('main()'),189 'parents' => $parents,190 'current' => $current,191 'children' => $children,192 ));193 }194 public function symbolShort()195 {196 $request = $this->_app->request();197 $id = $request->get('id');198 $threshold = $request->get('threshold');199 $symbol = $request->get('symbol');200 $metric = $request->get('metric');201 $profile = $this->_profiles->get($id);202 $profile->calculateSelf();203 list($parents, $current, $children) = $profile->getRelatives($symbol, $metric, $threshold);204 $this->_template = 'runs/symbol-short.twig';205 $this->set(array(206 'symbol' => $symbol,207 'id' => $id,208 'main' => $profile->get('main()'),209 'parents' => $parents,210 'current' => $current,211 'children' => $children,212 ));213 }214 public function callgraph()215 {216 $request = $this->_app->request();217 $profile = $this->_profiles->get($request->get('id'));218 $this->_template = 'runs/callgraph.twig';219 $this->set(array(220 'profile' => $profile,221 'date_format' => $this->_app->config('date.format'),222 ));223 }224 public function callgraphData()225 {226 $request = $this->_app->request();227 $response = $this->_app->response();228 $profile = $this->_profiles->get($request->get('id'));229 $metric = $request->get('metric') ?: 'wt';230 $threshold = (float)$request->get('threshold') ?: 0.01;231 $callgraph = $profile->getCallgraph($metric, $threshold);232 $response['Content-Type'] = 'application/json';233 return $response->body(json_encode($callgraph));234 }235 public function flamegraph()236 {237 $request = $this->_app->request();238 $profile = $this->_profiles->get($request->get('id'));239 $this->_template = 'runs/flamegraph.twig';240 $this->set(array(241 'profile' => $profile,242 'date_format' => $this->_app->config('date.format'),243 ));244 }245 public function flamegraphData()246 {247 $request = $this->_app->request();248 $response = $this->_app->response();249 $profile = $this->_profiles->get($request->get('id'));250 $metric = $request->get('metric') ?: 'wt';251 $threshold = (float)$request->get('threshold') ?: 0.01;252 $flamegraph = $profile->getFlamegraph($metric, $threshold);253 $response['Content-Type'] = 'application/json';...

Full Screen

Full Screen

RunServiceTest.php

Source:RunServiceTest.php Github

copy

Full Screen

...25class RunServiceTest extends TestCase26{27 use IntegrationTestBehaviour;28 private const TEST_MESSAGE = 'test';29 private EntityRepositoryInterface $runRepository;30 private EntityRepositoryInterface $logRepository;31 private Logger $logger;32 private RunService $runService;33 private Context $context;34 public function setUp(): void35 {36 /** @var EntityRepositoryInterface $runRepository */37 $runRepository = $this->getContainer()->get('swag_paypal_pos_sales_channel_run.repository');38 $this->runRepository = $runRepository;39 /** @var EntityRepositoryInterface $logRepository */40 $logRepository = $this->getContainer()->get('swag_paypal_pos_sales_channel_run_log.repository');41 $this->logRepository = $logRepository;42 $this->context = Context::createDefaultContext();43 $this->logger = (new LoggerFactory())->createLogger();44 $this->runService = new RunService($this->runRepository, $this->logRepository, $this->getContainer()->get(Connection::class), $this->logger);45 }46 public function testLogProcessAddLogWithoutProduct(): void47 {48 $context = Context::createDefaultContext();49 $runId = $this->runService->startRun(Defaults::SALES_CHANNEL, 'complete', $this->context);50 static::assertNotNull($this->runRepository->searchIds(new Criteria([$runId]), $context)->firstId());51 $this->logger->info(self::TEST_MESSAGE);52 $this->runService->writeLog($runId, $this->context);53 $this->runService->finishRun($runId, $this->context);54 $run = $this->runRepository->search(new Criteria([$runId]), $context)->first();55 static::assertNotNull($run);56 static::assertInstanceOf(PosSalesChannelRunEntity::class, $run);57 static::assertNotNull($run->getFinishedAt());58 $criteria = new Criteria();59 $criteria->addFilter(new EqualsFilter('runId', $runId));60 $logEntry = $this->logRepository->search($criteria, $context)->first();61 static::assertNotNull($logEntry);62 static::assertInstanceOf(PosSalesChannelRunLogEntity::class, $logEntry);63 static::assertEquals(Logger::INFO, $logEntry->getLevel());64 static::assertEquals(self::TEST_MESSAGE, $logEntry->getMessage());65 static::assertEquals($runId, $logEntry->getRunId());66 static::assertNull($logEntry->getProductId());67 static::assertNull($logEntry->getProductVersionId());68 }69 public function testLogProcessAddLogWithProduct(): void70 {71 $context = Context::createDefaultContext();72 $runId = $this->runService->startRun(Defaults::SALES_CHANNEL, 'complete', $this->context);73 static::assertNotNull($this->runRepository->searchIds(new Criteria([$runId]), $context)->firstId());74 $product = $this->createProduct($context);75 static::assertNotNull($product);76 $this->logger->info(self::TEST_MESSAGE, ['product' => $product]);77 $this->runService->writeLog($runId, $this->context);78 $this->runService->finishRun($runId, $this->context);79 $run = $this->runRepository->search(new Criteria([$runId]), $context)->first();80 static::assertNotNull($run);81 static::assertInstanceOf(PosSalesChannelRunEntity::class, $run);82 static::assertNotNull($run->getFinishedAt());83 $criteria = new Criteria();84 $criteria->addFilter(new EqualsFilter('runId', $runId));85 $logEntry = $this->logRepository->search($criteria, $context)->first();86 static::assertNotNull($logEntry);87 static::assertInstanceOf(PosSalesChannelRunLogEntity::class, $logEntry);88 static::assertEquals(Logger::INFO, $logEntry->getLevel());89 static::assertEquals(self::TEST_MESSAGE, $logEntry->getMessage());90 static::assertEquals($runId, $logEntry->getRunId());91 static::assertEquals($product->getParentId(), $logEntry->getProductId());92 static::assertEquals($product->getVersionId(), $logEntry->getProductVersionId());93 }94 public function testAbortRun(): void95 {96 $context = Context::createDefaultContext();97 $runId = $this->runService->startRun(Defaults::SALES_CHANNEL, 'complete', $this->context);98 static::assertNotNull($this->runRepository->searchIds(new Criteria([$runId]), $context)->firstId());99 $run = $this->runRepository->search(new Criteria([$runId]), $context)->first();100 static::assertNotNull($run);101 static::assertInstanceOf(PosSalesChannelRunEntity::class, $run);102 static::assertNull($run->getFinishedAt());103 static::assertSame(PosSalesChannelRunDefinition::STATUS_IN_PROGRESS, $run->getStatus());104 $criteria = new Criteria();105 $criteria->addFilter(new EqualsFilter('runId', $runId));106 $logEntry = $this->logRepository->search($criteria, $context)->first();107 static::assertNull($logEntry);108 $this->runService->abortRun($run->getId(), $this->context);109 $run = $this->runRepository->search(new Criteria([$runId]), $context)->first();110 static::assertNotNull($run);111 static::assertInstanceOf(PosSalesChannelRunEntity::class, $run);112 static::assertNotNull($run->getFinishedAt());113 static::assertSame(PosSalesChannelRunDefinition::STATUS_CANCELLED, $run->getStatus());114 $criteria = new Criteria();115 $criteria->addFilter(new EqualsFilter('runId', $runId));116 $logEntry = $this->logRepository->search($criteria, $context)->first();117 static::assertNotNull($logEntry);118 static::assertInstanceOf(PosSalesChannelRunLogEntity::class, $logEntry);119 static::assertEquals(Logger::EMERGENCY, $logEntry->getLevel());120 }121 public function testIsRunActiveTrue(): void122 {123 $runId = $this->runService->startRun(Defaults::SALES_CHANNEL, 'complete', $this->context);124 static::assertTrue($this->runService->isRunActive($runId, $this->context));125 }126 public function testIsRunActiveFalse(): void127 {128 $runId = $this->runService->startRun(Defaults::SALES_CHANNEL, 'complete', $this->context);129 $this->runService->finishRun($runId, $this->context);130 static::assertFalse($this->runService->isRunActive($runId, $this->context));131 }132 public function testIsRunActiveNoRun(): void133 {134 static::assertFalse($this->runService->isRunActive(Uuid::randomHex(), $this->context));135 }136 protected function createProduct(Context $context): ?ProductEntity137 {138 /** @var EntityRepositoryInterface $productRepository */139 $productRepository = $this->getContainer()->get('product.repository');140 $data = [141 'name' => 'Test product',142 'productNumber' => '123456789',143 'stock' => 1,144 'price' => [145 ['currencyId' => Defaults::CURRENCY, 'gross' => 19.99, 'net' => 10, 'linked' => false],146 ],147 'manufacturer' => ['name' => 'shopware AG'],148 'tax' => ['id' => $this->getValidTaxId(), 'name' => 'testTaxRate', 'taxRate' => 15],...

Full Screen

Full Screen

run

Using AI Code Generation

copy

Full Screen

1$run = new search();2$run->run();3$run = new search();4$run->run();5$run = new search();6$run->run();7$run = new search();8$run->run();9$run = new search();10$run->run();11$run = new search();12$run->run();13$run = new search();14$run->run();15$run = new search();16$run->run();17$run = new search();18$run->run();19$run = new search();20$run->run();21$run = new search();22$run->run();23$run = new search();24$run->run();25$run = new search();26$run->run();27$run = new search();28$run->run();29$run = new search();30$run->run();31$run = new search();32$run->run();33$run = new search();34$run->run();35$run = new search();36$run->run();

Full Screen

Full Screen

run

Using AI Code Generation

copy

Full Screen

1$search = new search();2$search->run();3$sea$ch = nsw search();4$search->run();5{6 private static $instance;7 private function __construct()8 {9 }10 public static function getInstance()11 {12 if (!isset(self::$instance)) {13 self::$instance = new self();14 }15 return self::$instance;16 }17 public function run()18 {19 echo 'searching...';20 }21}22require_once 'search.php';23$search = search::getInstance();24$search->run();25reearch = new search.php';26$search = search::getInstance();27$search->run();28require_once 'search.php';29$search = search::getInstance();30$search->run();

Full Screen

Full Screen

run

Using AI Code Generation

copy

Full Screen

1$search->run();2$search = new search();3$search->run();4{5 private static $instance;6 private function __construct()7 {8 }9 public static function getInstance()10 {11 if (!isset(self::$instance)) {12 self::$instance = new self();13 }14 return self::$instance;15 }16 public function run()17 {18 echo 'searching...';19 }20}21require_once 'search.php';22$search = search::getInstance();23$search->run();24require_once 'search.php';25$search = search::getInstance();26$search->run();27require_once 'search.php';28$search = search::getInstance();29$search->run();

Full Screen

Full Screen

run

Using AI Code Generation

copy

Full Screen

1include('search.php');2$search = new Search();3$search->run();4{5 public function run()6 {7 echo 'Search Form';8 }9}

Full Screen

Full Screen

run

Using AI Code Generation

copy

Full Screen

1requre_once 'search.php';2$object = new search();3$object->run();4Fatal error: Cal to undfied method serch::run() in /ho/abc/public_html/2php on line 65class search {6rivate $query;7private $queryType;8private $queryResult;9private $result;10private $resultType;11public function run() {12}13}14require_once 'search.php';15Fatal error: Call to undefined method search::run() in /home/abc/public_html/2.php on line 616class search {17private $query;18private $queryType;19private $queryResult;20private $result;21private $resultType;22public function run() {23}24}25Fatal error: Call to undefined method search::run() in /home/abc/public_html/2.php on line 626class search {27private $query;28private $queryType;29private $queryResult;30private $result;31private $resultType;32public function run() {33}34}35require_once 'search.php';36$object = new search();37$object->run();38class search {39private $query;40private $queryType;41private $queryResult;42private $result;43private $resultType;44public function run() {45echo 'Hello World!';

Full Screen

Full Screen

run

Using AI Code Generation

copy

Full Screen

1require_once 'Search.php';2$run = new Search();3$run->run();4{5 public function run()6 {7 $this->search();8 }9 public function search()10 {11 echo 'search';12 }13}14{15 public function run()16 {17 $this->search();18 }19 public function search()20 {21 echo 'search';22 }23}

Full Screen

Full Screen

run

Using AI Code Generation

copy

Full Screen

1include('search.php');2$search = new Search();3$search->run();4{5 public function run()6 {7 echo 'Search Form';8 }9}

Full Screen

Full Screen

run

Using AI Code Generation

copy

Full Screen

1$test = new Search;2$test->run();3class Search {4 public function run() {5 }6}7Fatal error: Call to undefined method Search::run()8include '1.php';9include 'filename.php';10require 'filename.php';11require_once 'filename.php';

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Phoronix-test-suite automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used method in search

Trigger run code on LambdaTest Cloud Grid

Execute automation tests with run on a cloud-based Grid of 3000+ real browsers and operating systems for both web and mobile applications.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful