/**
  * processes the task as a job
  */
 public function process()
 {
     // run the task
     $this->task->run(new SS_HTTPRequest());
     // mark job as completed
     $this->isComplete = true;
 }
 function init()
 {
     if (!Director::is_cli() && !Director::isDev() && !Permission::check("ADMIN")) {
         Security::permissionFailure();
     }
     parent::init();
 }
 public function init()
 {
     parent::init();
     if (!Permission::check('ADMIN')) {
         return Security::permissionFailure($this);
     }
 }
 /**
  * Check that the user has appropriate permissions to execute this task
  */
 public function init()
 {
     if (!Director::is_cli() && !Director::isDev() && !Permission::check('ADMIN')) {
         return Security::permissionFailure();
     }
     parent::init();
 }
 /**
  * Checks if this task is enabled / disabled via the config setting
  */
 public function __construct()
 {
     parent::__construct();
     if ($this->config()->get('disabled') === true) {
         $this->enabled = false;
     }
 }
 public function init()
 {
     parent::init();
     if (!Director::is_cli() && !Permission::check("ADMIN") && $_SERVER['REMOTE_ADDR'] != $_SERVER['SERVER_ADDR']) {
         return Security::permissionFailure();
     }
 }
 function init()
 {
     parent::init();
     $canAccess = Director::isDev() || Director::is_cli() || Permission::check("ADMIN");
     if (!$canAccess) {
         return Security::permissionFailure($this);
     }
 }
 /**
  * Check that we do not run this in production
  */
 public function init()
 {
     // only allowed to do this in DEV or TEST environments for obivious reasons
     if (Director::isLive()) {
         echo Debug::text("Sorry, can't do this in production/live environments");
         exit;
         // maybe return?
     }
     parent::init();
 }
 public function __construct()
 {
     if (!Director::is_cli()) {
         $this->eol = '<br>';
         $this->hr = '<hr>';
     } else {
         $this->eol = PHP_EOL;
         $this->hr = '--' . PHP_EOL;
     }
     parent::__construct();
 }
 function init()
 {
     if (method_exists(parent, 'init')) {
         parent::init();
     }
     if (!Director::is_cli() && !Permission::check("ADMIN") && $_SERVER['REMOTE_ADDR'] != $_SERVER['SERVER_ADDR']) {
         return Security::permissionFailure();
     }
     if (!$this->conf || !$this->facebook) {
         $this->__construct();
     }
 }
 public function __construct()
 {
     parent::__construct();
     $this->modulePath = BASE_PATH . '/omnipay-ui';
 }
 public function __construct($types = array())
 {
     parent::__construct();
     $this->types = $types;
 }
 /**
  * DataObjectAnnotatorTask constructor.
  * Setup default values. In this case title and description.
  */
 public function __construct()
 {
     parent::__construct();
     $this->title = 'DataObject annotations for specific DataObjects, Extensions or Controllers';
     $this->description = "DataObject Annotator annotates your DO's if possible, helping you write better code.<br />" . 'Usage: add the module or DataObject as parameter to the URL, e.g. ?module=mysite .';
 }
 public function __construct()
 {
     $this->title = 'Flush Varnish and SilverStripe caches.';
     $this->description = 'Flush the Varnish and SilverStripe caches on a (Twisted Bytes) varnish-cached hosting.';
     parent::__construct();
 }
 /**
  * shows a "Task Completed Message" on the screen.
  * @param BuildTask $buildTask
  * @param String $extraMessage
  */
 protected function displayCompletionMessage(BuildTask $buildTask, $extraMessage = '')
 {
     DB::alteration_message("\r\n\r\n\t\t\t------------------------------------------------------- <br />\r\n\t\t\tCOMPLETED THE FOLLOWING TASK:<br />\r\n\t\t\t<strong>" . $buildTask->getTitle() . "</strong><br />\r\n\t\t\t" . $buildTask->getDescription() . " <br />\r\n\t\t\t------------------------------------------------------- <br />\r\n\t\t\t{$extraMessage}\r\n\t\t");
 }
 function init()
 {
     //this checks security
     parent::init();
 }