3declare(strict_types=1);
 
   21use Sabre\DAV\Exception\NotFound;
 
   22use Sabre\DAV\Exception\Forbidden;
 
   25trait ilWebDAVAccessChildrenFunctionsTrait
 
   27    protected function getChildByParentRefId(
 
   34        $has_only_files_with_missing_storage = 
false;
 
   44                if ($child->getName() === 
$name) {
 
   47            } 
catch (RuntimeException 
$e) {
 
   48                if (
$e->getMessage() === 
'cannot read rource from resource storage server') {
 
   49                    $has_only_files_with_missing_storage = 
true;
 
   55        if (!is_null($child_node)) {
 
   59        if ($has_only_files_with_missing_storage) {
 
   63        throw new NotFound(
"$name not found");
 
   69    protected function getChildrenByParentRefId(
 
   74        $child_nodes = array();
 
   75        $already_seen_titles = array();
 
   76        $problem_info_file_needed = 
false;
 
   81                if ((
$key = array_search($child->getName(), $already_seen_titles)) !== 
false) {
 
   82                    unset($child_nodes[
$key]);
 
   83                    $problem_info_file_needed = 
true;
 
   86                $already_seen_titles[$child_ref] = $child->getName();
 
   88                $child_nodes[$child_ref] = $child;
 
   90                if (!$problem_info_file_needed &&
 
   92                    $problem_info_file_needed = 
true;
 
   94            } 
catch (NotFound | RuntimeException | Forbidden 
$e) {
 
   98        if ($problem_info_file_needed) {
 
  105    protected function checkIfChildExistsByParentRefId(
 
  119                if ($child->getName() === 
$name) {
 
const PROBLEM_INFO_FILE_NAME
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
const OBJECT_TITLE_NOT_DAVABLE
 
getProblemInfoFile(int $container_ref_id)
 
retrieveDAVObjectByRefID(int $ref_id)
 
getChildrenOfRefId(int $ref_id)
 
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...