/**
  * Filters the given primary keys for values identifing only existing
  * records.
  *
  * @param array <string> $keys An array of primary key values in their
  *              string representation
  *
  * @return array<string> The input array with all invalid values removed
  */
 public function filter(array $keys)
 {
     $listData = new SQLListData($this->getWidget(), $this->getDatabase(), $this->prepareListDataConfig());
     $filterKeys = array();
     if (count($keys) > 0) {
         foreach ($keys as $key) {
             array_push($filterKeys, explode('::', $key)[1]);
         }
     }
     return $listData->filter($filterKeys);
 }
 /**
  * Remove the provider index from key, to save the id only.
  *
  * @param array $keys
  *
  * @return array
  */
 public function filter(array $keys)
 {
     $listData = new SQLListData($this->getData()->getWidget(), Database::getInstance(), $this->getListDataConfig());
     $filterKeys = array();
     foreach ($keys as $key) {
         array_push($filterKeys, explode('::', $key)[1]);
     }
     return $listData->filter($filterKeys);
 }