Sunnysideup\UpgradeToSilverstripe4\Tasks\IndividualTasks\Reorganise
Runs the silverstripe/upgrade task "reorganise". See: https://github.com/silverstripe/silverstripe-upgrader#reorganise You can use this command to reorganise your folder structure to conform to the new structure introduced with SilverStripe 4.1.
Your mysite folder will be renamed to app and your code folder will be rename to src.
Synopsis
class Reorganise
extends Task
{
- // members
- protected string $taskStep = 's50';
- protected string $param1 = '';
- protected string $param2 = '';
- protected string $rootDirForCommand = '';
- protected string $settings = '';
- // Inherited members from Task
- protected bool $debug;
- protected string $taskName;
- protected string $taskStep;
- protected array $params;
- protected ModuleUpgrader|null $mu;
- protected string $commitMessage;
- // methods
- public void getTitle()
- public void getDescription()
- public void runActualTask()
- protected void hasCommitAndPush()
- // Inherited methods from Task
- public void __construct()
- public void getTaskName()
- public void getTaskStepCode()
- public void getTaskStep()
- public static Task create()
- public static void deleteTask()
- public void mu()
- public abstract string getTitle()
- public abstract string getDescription()
- public string getDescriptionNice()
- public void run()
- public abstract string|null runActualTask()
- public void setCommitMessage()
- protected void starter()
- protected void setParams()
- protected void ender()
- protected abstract bool hasCommitAndPush()
- protected string getCommitMessage()
- protected void commitAndPush()
- protected void runSilverstripeUpgradeTask()
Hierarchy
Members
protected
- $commitMessage
—
string
What to write in the commit message after the task is run, only useful if hasCommitAndPush() returns true - $debug
—
Sunnysideup\UpgradeToSilverstripe4\Tasks\bool
Are we running in debug mode? - $mu — Sunnysideup\UpgradeToSilverstripe4\Tasks\ModuleUpgrader|null
- $param1
- $param2
- $params
—
mixed
Array of params that define this task, holds information such as its taskName etc. - $rootDirForCommand
- $settings
- $taskName
—
string
set a specific task name if needed - $taskStep
- $taskStep
Methods
protected
public
Inherited from Sunnysideup\UpgradeToSilverstripe4\Tasks\Task
protected
- commitAndPush() — Adds all files to Git staging and commits them with set commit message after execution and pushes it via git
- ender() — Executed as the last step of a task. Used primarily for finishing off of changes made during execution of task.
- getCommitMessage() — The commit message that is used for the final git commit after running this task. IF none are set it will return a default message
- hasCommitAndPush() — Does the task require the module changes to be committed after the task has run.
- runSilverstripeUpgradeTask() — Runs the SilverStripe made upgrader
- setParams()
- starter() — Runs everything that should be run and begining of execution, I.e commiting everything to get or creating a backup branch before making changes
public
- create() — Creates all the singletons and puts them in the array of singletons. Depending on if they exist already or not.
- deleteTask() — Deletes reference to given task and removes it from list of tasks
- getDescription()
- getDescriptionNice() — remove white space from description and add # at the end lines are also wordwrapped
- getTaskName()
- getTaskStep()
- getTaskStepCode()
- getTitle() — returns title of the task at hand ...
- mu()
- run() — Executes the seperate stages of this task in chronological ordering
- runActualTask() — runs the actual task and needs to be defined in any class that extends this class.
- setCommitMessage()