I am using the Tree - Nestedset behavior extension for the Doctrine 2 strategy and Closure Table. On my website, users can create folders and subfolders and view them. I implemented this using the Closure Table strategy and create folders using the childrenHierarchy () method :
$directoryTree = $repository->childrenHierarchy(
null,
true,
array(
'decorate' => false,
'childSort' => array('field' => 'directory_name', 'dir' => 'asc')
));
It works fine, but returns all folders for all users, and I don’t know how to determine user_id in this case, so that only folders belonging to the user are displayed. Is there any way to do this?
I will be happy for your answers.
source
share