Skip to content

Instantly share code, notes, and snippets.

@peschmae
Created November 29, 2012 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peschmae/4167956 to your computer and use it in GitHub Desktop.
Save peschmae/4167956 to your computer and use it in GitHub Desktop.
queryinterface
/**
* Finds incompleted transactions for a user. Used to have only one single
* transaction.
*
* @param $customerId
* @internal param string $customerNumber
* @return Tx_Extbase_Persistence_QueryResultInterface
*/
public function findIncompleteByCustomerId($customerId) {
$query = $this->createQuery();
$customerNumberConstraint = $query->equals('customer_id', $customerId);
$completeConstraint = $query->equals('complete', '0');
$constraint = $query->logicalAnd($customerNumberConstraint, $completeConstraint);
$query->matching($constraint);
$resultset = $query->execute();
return $resultset;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment