private function getCCLists() { if (!$this->owner->CCKey || !$this->owner->CCToken) { return null; } $CC = new ConstantContactV2(); $lists = $CC->getLists(); // get list from the params, or just the first ACTIVE list if no param was passed $the_lists = '</ul>'; foreach ($lists as $list) { $the_lists .= '<li>' . $list->id . ' : ' . $list->name . ' (' . $list->contact_count . ')</li>'; } $the_lists .= '</ul>'; return $the_lists; }
function __construct() { require_once __DIR__ . '/../vendor/ConstantContactV2/Ctct/autoload.php'; $siteConfig = SiteConfig::current_site_config(); self::$cckey = $siteConfig->CCKey; self::$cctoken = $siteConfig->CCToken; }