Ejemplo n.º 1
0
 /**
  * Make a sitetree model
  *
  * @param \Cmsable\Routing\TreeScope\TreeScope $scope
  * @return \Cmsable\Model\SiteTreeModelInterface
  **/
 protected function makeModel(TreeScope $scope)
 {
     $model = clone $this->treeModelPrototype;
     $model->setRootId($scope->getModelRootId());
     $model->setPathPrefix($scope->getPathPrefix());
     return $model;
 }
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;
 }