You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace console\commands;
-
- use common\logic\Distribution\Distribution\Wrapper\DistributionManager;
- use common\logic\Producer\Producer\Wrapper\ProducerManager;
- use yii\console\Controller;
-
- class DemoAccountController extends Controller
- {
- public function actionIndex()
- {
- $producerManager = ProducerManager::getInstance();
- $distributionManager = DistributionManager::getInstance();
-
- $producerDemo = $producerManager->findOneProducerDemoAccount();
- \Yii::$app->logic->setProducerContext($producerDemo);
-
- if ($producerDemo) {
- $dateTime = strtotime("+7 day");
- $distribution = $distributionManager->createDistributionIfNotExist(date('Y-m-d', $dateTime));
- $distributionManager->activeDistribution($distribution);
- }
- }
- }
-
- ?>
|