You are here

class AcquiaLiftTarget in Acquia Lift Connector 7

Same name and namespace in other branches
  1. 7.2 plugins/agent_types/AcquiaLiftTarget.inc \AcquiaLiftTarget

@file Provides an agent for doing fixed targeting.

Hierarchy

  • class \AcquiaLiftTarget extends \PersonalizeAgentBase implements \PersonalizeExplicitTargetingInterface

Expanded class hierarchy of AcquiaLiftTarget

1 string reference to 'AcquiaLiftTarget'
acquia_lift_get_agent_types in ./acquia_lift.module
Returns the agent types this module provides.

File

plugins/agent_types/AcquiaLiftTarget.inc, line 7
Provides an agent for doing fixed targeting.

View source
class AcquiaLiftTarget extends PersonalizeAgentBase implements PersonalizeExplicitTargetingInterface {

  /**
   * Implements PersonalizeAgentInterface::create().
   */
  public static function create($agent_data) {
    $status = personalize_agent_get_status($agent_data->machine_name);
    return new self($agent_data->machine_name, $agent_data->label, $agent_data->data, $status, !empty($agent_data->started) ? $agent_data->started : NULL);
  }

  /**
   * Implements PersonalizeExplicitTargetingInterface::explicitTargetingSupportMultiple().
   */
  public static function explicitTargetingSupportMultiple() {
    return PersonalizeExplicitTargetingInterface::EXPLICIT_TARGETING_MULTIPLE_BOTH;
  }

  /**
   * Implements PersonalizeAgentInterface::getType().
   */
  public function getType() {
    return 'acquia_lift_target';
  }

  /**
   * Implements PersonalizeAgentInterface::getAssets().
   */
  public function getAssets() {
    return array(
      'js' => array(
        drupal_get_path('module', 'acquia_lift') . '/js/acquia_lift_target.js' => array(
          'type' => 'file',
          'scope' => 'footer',
          'defer' => TRUE,
        ),
      ),
    );
  }

  /**
   * Implements PersonalizeAgentInterface::convertContextToFeatureString().
   */
  public static function convertContextToFeatureString($name, $value, $is_mutex = FALSE) {
    $value = self::cleanFeatureValue($value);
    return $name . '::' . $value;
  }

  /**
   * Implements PersonalizeAgentInterface::supportsMVTs().
   */
  public function supportsMVTs() {
    return FALSE;
  }

  /**
   * Implements PersonalizeAgentInterface::supportsMultipleDecisionPoints().
   */
  public function supportsMultipleDecisionPoints() {
    return FALSE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AcquiaLiftTarget::convertContextToFeatureString public static function Implements PersonalizeAgentInterface::convertContextToFeatureString().
AcquiaLiftTarget::create public static function Implements PersonalizeAgentInterface::create().
AcquiaLiftTarget::explicitTargetingSupportMultiple public static function Implements PersonalizeExplicitTargetingInterface::explicitTargetingSupportMultiple().
AcquiaLiftTarget::getAssets public function Implements PersonalizeAgentInterface::getAssets().
AcquiaLiftTarget::getType public function Implements PersonalizeAgentInterface::getType().
AcquiaLiftTarget::supportsMultipleDecisionPoints public function Implements PersonalizeAgentInterface::supportsMultipleDecisionPoints().
AcquiaLiftTarget::supportsMVTs public function Implements PersonalizeAgentInterface::supportsMVTs().