This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function runTask($task_id, $site_name) { | |
$plugin = $this->pluginManagerService->createInstance($task_id); | |
$site = Site::load($site_name); | |
$status = $plugin->run($site); | |
if ($status == 'Success') { | |
$output = $plugin->getTaskOutput(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\sitemanager\Plugin\TaskPlugin; | |
use Drupal\sitemanager\Plugin\TaskPluginBase; | |
/** | |
* Class RunCron. | |
* | |
* @package Drupal\sitemanager\Plugin\TaskPlugin | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\sitemanager\Plugin; | |
use Drupal\Component\Plugin\PluginBase; | |
use Drupal\Core\Config\ConfigFactory; | |
use Symfony\Component\DependencyInjection\ContainerInterface; | |
use Drupal\Core\Plugin\ContainerFactoryPluginInterface; | |
use Drupal\Core\StringTranslation\StringTranslationTrait; | |
use Drupal\Core\StringTranslation\TranslationInterface; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\sitemanager\Plugin; | |
use Drupal\Component\Plugin\PluginInspectionInterface; | |
/** | |
* Defines an interface for Task plugin plugins. | |
*/ | |
interface TaskPluginInterface extends PluginInspectionInterface { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Drupal\sitemanager\Plugin; | |
use Drupal\Core\Plugin\DefaultPluginManager; | |
use Drupal\Core\Cache\CacheBackendInterface; | |
use Drupal\Core\Extension\ModuleHandlerInterface; | |
/** | |
* Provides the Task plugin plugin manager. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @file | |
* Provides TaskPlugin base class. | |
*/ | |
namespace Drupal\sitemanager\Annotation; | |
use Drupal\Component\Annotation\Plugin; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
from os import listdir | |
from os.path import isfile, join | |
from os import walk | |
test_path = sys.argv[1] | |
files = [] |
NewerOlder