public function initCmsComponents($cmsController)
{
$snippetComponents = Snippet::listPageComponents($this->getFileName(), $this->theme, $this->markup . $this->code);
$componentManager = ComponentManager::instance();
foreach ($snippetComponents as $componentInfo) {
// Register components for snippet-based components
// if they're not defined yet. This is required because
// not all snippet components are registered as components,
// but it's safe to register them in render-time.
if (!$componentManager->hasComponent($componentInfo['class'])) {
$componentManager->registerComponent($componentInfo['class'], $componentInfo['alias']);
}
$cmsController->addComponent($componentInfo['class'], $componentInfo['alias'], $componentInfo['properties']);
}
}