Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezpmultivariatetesthandler.php
Go to the documentation of this file.
1 <?php
12 class ezpMultivariateTestHandler implements ezpMultivariateTestHandlerInterface
13 {
14
20 public function isEnabled()
21 {
22 return ( eZINI::instance( 'content.ini' )->variable( 'TestingSettings', 'MultivariateTesting' ) === 'enabled' );
23 }
24
31 public function execute( $nodeID )
32 {
33 $currentSiteAccess = eZSiteAccess::current();
34
35 $testScenario = ezpMultivariateTestScenario::fetchEnabledByNodeID( $nodeID );
36 if ( $testScenario instanceof ezpMultivariateTestScenario
37 && in_array( $currentSiteAccess['name'], eZINI::instance( 'content.ini' )->variable( 'TestingSettings', 'EnabledForSiteAccessList' ) ) )
38 {
39 $node = $testScenario->getRandomNode();
40
41 if ( $node instanceof eZContentObjectTreeNode )
42 $nodeID = $node->attribute( 'node_id' );
43 }
44
45 return $nodeID;
46 }
47 }
eZSiteAccess\current
static current()
Definition: ezsiteaccess.php:676
ezpMultivariateTestHandler
Definition: ezpmultivariatetesthandler.php:13
ezpMultivariateTestHandler\execute
execute( $nodeID)
Definition: ezpmultivariatetesthandler.php:31
ezpMultivariateTestHandler\isEnabled
isEnabled()
Definition: ezpmultivariatetesthandler.php:20
ezpMultivariateTestHandlerInterface
Definition: ezpmultivariatetesthandlerinterface.php:13
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.