Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 5 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
53 | public function load(ObjectManager $manager) |
||
54 | { |
||
55 | $this->manager = $manager; |
||
56 | $repository = $manager->getRepository('OroCRMSalesBundle:Opportunity'); |
||
57 | $connection = $repository->createQueryBuilder('o')->getEntityManager()->getConnection(); |
||
58 | $query = 'UPDATE orocrm_sales_opportunity SET state_id = ? WHERE status_name = ?'; |
||
59 | parent::load($manager); |
||
60 | |||
61 | foreach ($this->statusMapping as $status => $state) { |
||
62 | $connection->executeQuery($query, [$state, $status]); |
||
63 | } |
||
64 | } |
||
65 | } |
||
66 |