You are here

public function InstapageCmsPluginSubaccountModel::getAllTokens in Instapage plugin 8.3

Same name and namespace in other branches
  1. 7.3 core/models/InstapageCmsPluginSubaccountModel.php \InstapageCmsPluginSubaccountModel::getAllTokens()

Gets all the tokens - stored in plugin's settings and bound to currently used app user account.

Return value

array List of tokens.

File

core/models/InstapageCmsPluginSubaccountModel.php, line 36

Class

InstapageCmsPluginSubaccountModel
Class responsible for managing the subaccounts in Instapage app.

Code

public function getAllTokens() {
  if ($this->subaccountTokens === null) {
    $tokens = InstapageCmsPluginHelper::getTokens();
    $accountKeys = $this
      ->getAccountBoundTokens();
    $this->subaccountTokens = array_merge($tokens, $accountKeys);
  }
  return $this->subaccountTokens;
}