Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
nateiler committed Nov 13, 2019
2 parents e104ffb + d5dce05 commit 0b0948a
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 5 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 1.2.0 - 2019-11-08
### Added
- Introducing: Email Subscription interactions

### Fixed
- MySQL integer column exceeding 2147483647 in size.

## 1.1.0 - 2019-11-08
### Added
- Introducing: Visitor tracking

## 1.0.3 - 2019-06-09
### Fixed
- Incorrect default connection references
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "flipboxfactory/craft-hubspot",
"description": "HubSpot integration for Craft CMS",
"version": "1.1.0",
"version": "1.2.0",
"type": "craft-plugin",
"license": "proprietary",
"keywords": [
Expand All @@ -12,7 +12,7 @@
],
"require": {
"craftcms/cms": "^3.2",
"flipboxdigital/hubspot": "^2.2",
"flipboxdigital/hubspot": "^2.4.0",
"flipboxfactory/craft-ember": "^2.1",
"flipboxfactory/craft-integration": "^2.2.2",
"flipboxfactory/craft-psr3": "^1.1"
Expand Down Expand Up @@ -48,10 +48,10 @@
"documentationUrl": "https://hubspot.flipboxfactory.com",
"hasCpSettings": true,
"hasCpSection": true,
"schemaVersion": "1.3.0",
"schemaVersion": "1.3.1",
"branch-alias": {
"dev-master": "1.0.x-dev",
"dev-develop": "1.0.x-dev"
"dev-master": "1.2.x-dev",
"dev-develop": "1.2.x-dev"
}
}
}
49 changes: 49 additions & 0 deletions src/criteria/EmailSubscriptionCriteria.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

/**
* @copyright Copyright (c) Flipbox Digital Limited
* @license https://flipboxfactory.com/software/hubspot/license
* @link https://www.flipboxfactory.com/software/hubspot/
*/

namespace flipbox\craft\hubspot\criteria;

use craft\elements\User;
use flipbox\craft\ember\objects\ElementAttributeTrait;

/**
* @author Flipbox Factory <[email protected]>
* @since 1.2.0
*/
class EmailSubscriptionCriteria extends \Flipbox\HubSpot\Criteria\EmailSubscriptionCriteria
{
use CacheTrait,
ConnectionTrait,
ElementAttributeTrait;

/**
* @return string|null
*/
public function findId()
{
if (null === $this->id) {
$this->id = $this->resolveId();
}

return $this->id;
}

/**
* @return string|null
*/
protected function resolveId()
{
$element = $this->getElement();

if (!$element instanceof User) {
return null;
}

return $element->email;
}
}

0 comments on commit 0b0948a

Please sign in to comment.