Du kannst nicht mehr als 25 Themen auswählen
Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
|
- <?php
-
- namespace console\commands;
-
- use common\logic\Distribution\Distribution\Wrapper\DistributionManager;
- use common\logic\Producer\Producer\Wrapper\ProducerManager;
- use yii\console\Controller;
-
- class ActiveDistributionsInAdvanceController extends Controller
- {
- public function actionIndex()
- {
- $producerManager = ProducerManager::getInstance();
- $distributionManager = DistributionManager::getInstance();
-
- $producersArray = $producerManager->findProducersActive();
- foreach($producersArray as $producer) {
- \Yii::$app->logic->setProducerContext($producer);
- $weeksDistributionsActivatedInAdvance = $producerManager->getConfig('option_weeks_distributions_activated_in_advance');
- if($weeksDistributionsActivatedInAdvance) {
- $date = new \DateTime('+'.$weeksDistributionsActivatedInAdvance.' weeks');
- $distributionManager->activeDistributionByDate($date);
- }
- }
- }
- }
-
- ?>
|