add abstract getDispatcher method to use CartTrai

This commit is contained in:
Etienne Roudeix
2013-09-19 16:06:42 +02:00
parent ec7d4471dc
commit 198bd9bec8
2 changed files with 11 additions and 11 deletions

View File

@@ -266,4 +266,14 @@ class CouponBaseAdapter implements CouponAdapterInterface
{
return $this->container->get('thelia.constraint.validator');
}
/**
* Return the event dispatcher,
*
* @return \Symfony\Component\EventDispatcher\EventDispatcher
*/
public function getDispatcher()
{
return $this->container->get('event_dispatcher');
}
}

View File

@@ -1653,18 +1653,8 @@ abstract class Order implements ActiveRecordInterface
$modifiedColumns[':p' . $index++] = 'UPDATED_AT';
}
$db = Propel::getServiceContainer()->getAdapter(OrderTableMap::DATABASE_NAME);
$dbMap = Propel::getServiceContainer()->getDatabaseMap(OrderTableMap::DATABASE_NAME);
$tableName = OrderTableMap::TABLE_NAME;
if ($db->useQuoteIdentifier()) {
$tableName = $db->quoteIdentifierTable($tableName);
}
$sql = sprintf(
'INSERT INTO %s (%s) VALUES (%s)',
$tableName,
'INSERT INTO order (%s) VALUES (%s)',
implode(', ', $modifiedColumns),
implode(', ', array_keys($modifiedColumns))
);