Пример #1
0
 /**
  * Constructor - instantiates one object of this class
  */
 public function __construct($name, $plan = null)
 {
     if (!is_null($plan) && !$plan instanceof backup_plan) {
         throw new backup_task_exception('wrong_backup_plan_specified');
     }
     parent::__construct($name, $plan);
 }
Пример #2
0
 /**
  * Include this condition only if we are including groups in restore, or
  * if it's a generic 'same activity' one.
  *
  * @param int $restoreid The restore Id.
  * @param int $courseid The ID of the course.
  * @param base_logger $logger The logger being used.
  * @param string $name Name of item being restored.
  * @param base_task $task The task being performed.
  *
  * @return Integer groupid
  */
 public function include_after_restore($restoreid, $courseid, \base_logger $logger, $name, \base_task $task)
 {
     return !$this->groupid || $task->get_setting_value('groups');
 }