public function getChannels($allDescendants = false)
    {
        if ($allDescendants) {
            $channels = array();
            foreach ($this->channels as $channel) {
                $channels = \array_merge(
                    $channels,
                    array($channel->getCfg('channel') => $channel),
                    $channel->getChannels(true)
                );
            }
            return $channels;
        }
        return $this->channels;
    }