/**
  * Loads tree for a given namespace
  *
  * @param string $namespace Namespace to build tree for
  * @return Tx_PtExtbase_Tree_Tree Tree build for given namespace
  */
 public function loadTreeByNamespace($namespace)
 {
     if ($this->treeContext->respectEnableFields()) {
         return $this->treeBuilder->buildTreeForNamespaceWithoutInaccessibleSubtrees($namespace);
     } else {
         return $this->treeBuilder->buildTreeForNamespace($namespace);
     }
 }
 /**
  * @todo If several tree widgets are needed on the same page, provide an identifier and select the right repo from session
  *
  * Restore the repository settings from namespace
  */
 public function restoreTreeSettingsFromSession()
 {
     $settings = Tx_PtExtbase_State_Session_Storage_SessionAdapter::getInstance()->read('Tx_PtExtbase_Tree_Configuration');
     $settings = array('repository' => 'Tx_PtCertification_Domain_Repository_CategoryRepository', 'namespace' => 'tx_ptcertification_domain_model_category', 'respectEnableFields' => $this->treeContext->respectEnableFields());
     if (array_key_exists('repository', $settings)) {
         $nodeRepositoryClassName = $settings['repository'];
         if ($nodeRepositoryClassName && class_exists($nodeRepositoryClassName)) {
             $this->nodeRepositoryClassName = $nodeRepositoryClassName;
         }
     }
     if (array_key_exists('namespace', $settings)) {
         $this->treeNameSpace = $settings['namespace'];
     }
 }