Example #1
0
 /**
  * contructor
  * 
  * @param  string|Tinebase_Model_Application  $_application  the current application
  * @param  string                             $_container    the current path
  */
 public function __construct(Tinebase_Model_Container $_container, $_useIdAsName = false)
 {
     parent::__construct($_container, $_useIdAsName);
     $this->_path = '/' . $this->_application->getId() . '/folders/' . $this->_container->type . '/';
     if ($this->_container->type == Tinebase_Model_Container::TYPE_SHARED) {
         $this->_path .= $this->_container->getId();
     } else {
         $this->_path .= Tinebase_Core::getUser()->accountId . '/' . $this->_container->getId();
     }
 }
 /**
  * contructor
  * 
  * @param  string|Tinebase_Model_Application  $_application  the current application
  * @param  string                             $_container    the current path
  */
 public function __construct(Tinebase_Model_Container $_container, $_useIdAsName = false)
 {
     parent::__construct($_container, $_useIdAsName);
     $this->_path = Tinebase_FileSystem::getInstance()->getContainerPath($this->_container);
     // make sure filesystem path exists
     try {
         Tinebase_FileSystem::getInstance()->stat($this->_path);
     } catch (Tinebase_Exception_NotFound $tenf) {
         Tinebase_FileSystem::getInstance()->mkdir($this->_path);
     }
 }