/**
  * Add style groups to the page
  *
  * @param array $ids
  */
 protected function addGroupsToPage(array $ids)
 {
     // Do not remove the order setting or otherwise the method will use registered models
     // if available and the order will not be correct
     $assetGroupModels = AssetGroupModel::findMultipleByIds($ids, array('order' => \Database::getInstance()->findInSet('id', $ids)));
     if ($assetGroupModels === null) {
         return;
     }
     /** @var AssetGroupModel $assetGroupModel */
     foreach ($assetGroupModels as $assetGroupModel) {
         /** @var BaseGroup $assetGroup */
         $assetGroup = static::getAssetGroupByModel($assetGroupModel);
         if ($assetGroup === null) {
             continue;
         }
         $assetGroup->addToPage();
     }
 }