Ejemplo n.º 1
0
 /**
  * Return a unique id for a scope. Mostly used as a cache-id in its local
  * models array
  *
  * @param \Cmsable\Routing\TreeScope\TreeScope $scope
  * @return string
  **/
 protected function getScopeId(TreeScope $scope)
 {
     return $scope->getName() . '|' . $scope->getModelRootId();
 }
Ejemplo n.º 2
0
 /**
  * Adds the passed scope to the scope array
  *
  * @param \Cmsable\Routing\TreeScope\TreeScope $treeScope
  * @return void
  **/
 protected function addToScopes(TreeScope $scope)
 {
     $this->scopes[] = $scope;
     $this->scopeByName[$scope->getName()] = $scope;
     $this->scopeByModelRootId[$scope->getModelRootId()] = $scope;
     $this->scopeByPathPrefix[$scope->getPathPrefix()] = $scope;
 }