User Repository\UserDefinedChannel->selectByUid instead of Factory\UserDefinedChannel->getForUser

- Rename Repository\Channel to Repository\UserDefinedChannel
- Add new Collection\UserDefinedChannels class
- Move Factory\Timeline->createFromTableRow to Factory\UserDefinedChannel
This commit is contained in:
Hypolite Petovan 2023-10-07 05:44:24 -04:00
parent 8ac6d0ef04
commit 710f9eecb2
12 changed files with 108 additions and 80 deletions

View file

@ -574,7 +574,7 @@ class Widget
}
}
foreach (DI::UserDefinedChannelFactory()->getForUser($uid) as $channel) {
foreach (DI::userDefinedChannel()->selectByUid($uid) as $channel) {
if (empty($enabled) || in_array($channel->code, $enabled)) {
$channels[] = ['ref' => $channel->code, 'name' => $channel->label];
}