public function getChild($name)
 {
     // filter name
     $name = static::filterName($name);
     // check if child exists
     if (array_key_exists($name, static::$siteDirectories)) {
         $className = static::$siteDirectories[$name];
         return new $className($name);
     } elseif ($collection = Collection::getByHandle($name)) {
         return $collection;
     }
     throw new \Sabre\DAV\Exception\FileNotFound('The file with name: ' . $name . ' could not be found');
 }
Example #2
0
	public function __construct() {
		$u = new User();
		$this->uc = Collection::getByHandle("uID=" . $u->getUserID());
		
		$myNotes = "";
		$bl = $this->uc->getBlocks('dashboard_notes');
		if (is_object($bl[0])) {
			$bo = $bl[0];
			$this->notesBlock = $bo;
			$bc = $bl[0]->getInstance();
			$myNotes = $bc->content;
		}
		$this->set('myNotes', $myNotes);
	}