/**
  * Remove pages with empty attributes
  *
  * @param SS_List $list
  * @param string $type
  * @return SS_List
  */
 private function removeEmptyAttributes(SS_List $list, $type)
 {
     $pageAttributes = $list->map('ID', $type)->toArray();
     $emptyAttributess = array_map(function ($value) {
         return $value == '';
     }, $pageAttributes);
     if (!count($emptyAttributess)) {
         return $list;
     }
     return $list->filter(array('ID:not' => array_keys(array_filter($emptyAttributess, function ($value) {
         return $value == 1;
     }))));
 }