/** * @inheritDoc IElementType::getSource() * * @param string $key * @param string|null $context * * @return array|null */ public function getSource($key, $context = null) { if (preg_match('/folder:(\\d+)(:single)?/', $key, $matches)) { $folder = craft()->assets->getFolderById($matches[1]); if ($folder) { return $this->_assembleSourceInfoForFolder($folder, empty($matches[2])); } } return parent::getSource($key, $context); }