CodeExplorer getTagFolder example
return $ok;
} protected function doSave(array
$values, int
$lifetime, array
$addTagData =
[], array
$removeTagData =
[]): array
{ $failed =
$this->
doSaveCache($values,
$lifetime);
// Add Tags as symlinks
foreach ($addTagData as $tagId =>
$ids) { $tagFolder =
$this->
getTagFolder($tagId);
foreach ($ids as $id) { if ($failed && \
in_array($id,
$failed, true
)) { continue;
} $file =
$this->
getFile($id);
if (!@
symlink($file,
$tagLink =
$this->
getFile($id, true,
$tagFolder)) && !
is_link($tagLink)) { @
unlink($file);
$failed[] =
$id;
} }