Exemplo n.º 1
0
 /**
  * Returns the unique element IDs that match a given element query.
  *
  * @param DbCommand $query
  * @return array
  */
 private function _getElementIdsFromQuery(DbCommand $query)
 {
     // Get the matched element IDs, and then have the SearchService filter them.
     $elementIdsQuery = craft()->db->createCommand()->select('elements.id')->from('elements elements')->group('elements.id');
     $elementIdsQuery->setWhere($query->getWhere());
     $elementIdsQuery->setJoin($query->getJoin());
     $elementIdsQuery->params = $query->params;
     return $elementIdsQuery->queryColumn();
 }