Пример #1
0
 public function todo(AddContentEvent $event)
 {
     $todos[] = TodoUtils::createAutoItem(Swf2Vid::swf2vidKey . '/image', "Setup EC2 image details", '/admin/config/private');
     $todos[] = TodoUtils::createAutoItem(Swf2Vid::swf2vidKey . '/bucket_name', "Setup S3 upload details", '/admin/config/private');
     /** @var Model $page */
     if ($page = Loader::getInstance()->moduleExists('App\\Models\\Page')) {
         $todos[] = ['name' => 'Create page: "/video-credits" for buying additional video credits', 'status' => $page::find_by_slug_and_enabled('/video-credits', 'y') ? 'complete' : 'incomplete', 'link' => '/admin/pages'];
     }
     $contents = $event->getContents();
     $event->setContents(array_merge($contents, ['Swf2Vid' => $todos]));
 }
Пример #2
0
 public function menu(AddContentEvent $event)
 {
     $event->addContent('RUN crontab -l | { cat; echo "* * * * * /var/www/vendor/bin/cron-runner"; } | crontab -');
 }
Пример #3
0
 public function todo(AddContentEvent $event)
 {
     $todos[] = ['name' => "Create an autoresponder campaign", 'status' => ArCampaign::count(['conditions' => ['enabled="y"']]) ? 'complete' : 'incomplete', 'link' => '/admin/mails'];
     $contents = $event->getContents();
     $event->setContents(array_merge($contents, ['Autoresponder' => $todos]));
 }