/**
  * Get the groups of particular type
  *
  * @param array $types
  *
  * @return array
  */
 protected function getGroups(array $types)
 {
     $groups = array();
     $groupsCollection = AssetGroupModel::findBy(array("type IN ('" . implode("','", $types) . "')"), null, array('order' => 'name'));
     if ($groupsCollection !== null) {
         foreach ($groupsCollection as $group) {
             $groups[$group->id] = $group->name;
         }
     }
     return $groups;
 }
 /**
  * Get the groups of particular type
  *
  * @param string $type
  *
  * @return array
  */
 protected function getGroups($type)
 {
     $groups = array();
     $groupsCollection = AssetGroupModel::findBy('type', $type, array('order' => 'name'));
     if ($groupsCollection !== null) {
         foreach ($groupsCollection as $group) {
             $groups[$group->id] = $group->name;
         }
     }
     return $groups;
 }