You are here

private function FeatureContext::getCurrentCampaign in Acquia Lift Connector 7.2

Same name and namespace in other branches
  1. 7 behat-tests/features/bootstrap/FeatureContext.php \FeatureContext::getCurrentCampaign()

Helper function to retrieve the currently active campaign from the client Javascript.

Return value

string The machine name for the currently active campaign or empty string.

2 calls to FeatureContext::getCurrentCampaign()
FeatureContext::getAudienceElement in behat-tests/features/bootstrap/FeatureContext.php
Helper function to retrieve a specific audience targeting element for the current campaign.
FeatureContext::getVariationLinkCss in behat-tests/features/bootstrap/FeatureContext.php
Helper function to generate the css for a variation action link.

File

behat-tests/features/bootstrap/FeatureContext.php, line 1005

Class

FeatureContext
Defines application features from the specific context.

Code

private function getCurrentCampaign() {
  $script = 'return Drupal.settings.personalize.activeCampaign;';
  return $this
    ->getMink()
    ->getSession()
    ->evaluateScript($script);
}