public function addCollection(self $collection)
    {
        $this->renderDefinitions = \array_merge($this->renderDefinitions, $collection->all());
        $this->resources = \array_merge($this->resources, $collection->getResources());
    }