| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function createTenant($subdomain, $name, $disabled, $organization) |
||
| 26 | { |
||
| 27 | $tenant = parent::createTenant($subdomain, $name, $disabled, $organization); |
||
| 28 | |||
| 29 | $this->getObjectManager()->persist($tenant); |
||
| 30 | $this->getObjectManager()->flush(); |
||
| 31 | |||
| 32 | /** @var RevisionManagerInterface $revisionManager */ |
||
| 33 | $revisionManager = $this->getContainer()->get('swp.manager.revision'); |
||
| 34 | |||
| 35 | /** @var RevisionInterface $firstTenantPublishedRevision */ |
||
| 36 | $revision = $revisionManager->create(); |
||
| 37 | $revision->setTenantCode($tenant->getCode()); |
||
| 38 | $revisionManager->publish($revision); |
||
| 39 | |||
| 40 | return $tenant; |
||
| 41 | } |
||
| 42 | } |
||
| 43 |