/**
  * Inject the tokens into each scope
  *
  * @param CmsController $controller
  *
  * @return $this
  */
 public function initScopeTokens(CmsController $controller = null)
 {
     if (!$controller instanceof CmsController) {
         return $this;
     }
     $scopeBase =& $controller->vars['this'];
     foreach ($this->getScopeTokens() as $tokenScope) {
         $tokens = TokensModel::tokenScope($tokenScope)->get();
         if (self::TOKEN_SCOPE_GLOBAL === $tokenScope) {
             $scopeBase[$this->tmplTag] = new \stdClass();
             $scope =& $scopeBase[$this->tmplTag];
         } else {
             $scopeBase[$tokenScope]->tk = new \stdClass();
             $scope =& $scopeBase[$tokenScope]->{$this->tmplTag};
         }
         $scope = $this->initScope($tokenScope, $tokens);
         unset($scope);
     }
     return $this;
 }