Sunnysideup\ModuleChecks\Commands\FilesToAdd\AddGitIgnoreToModule
Synopsis
class AddGitIgnoreToModule
extends FilesToAddAbstract
{
- // members
- protected string $sourceLocation = 'app/template_files/.gitignore';
- protected string $fileLocation = '.gitignore';
- private static bool $enabled = true;
- // Inherited members from FilesToAddAbstract
- protected array $gitReplaceArray;
- protected array $replaceArray;
- protected string $rootDirForModule;
- protected string $fileLocation;
- protected string $sourceLocation;
- protected boolean $useCustomisationFile;
- protected $repo;
- // Inherited members from BaseCommand
- protected $repo;
- protected string $errorString;
- // methods
- public string getDescription()
- // Inherited methods from FilesToAddAbstract
- public void __construct()
- public void setRootDirForModule()
- public void setSourceLocation()
- public void setFileLocation()
- public abstract void getDescription()
- public void run()
- public string replaceWordsInFile()
- protected void getFilePath()
- protected void checkFolderPath()
- public string getFileLocation()
- public string replaceWordsInText()
- public void compareWithText()
- public void replaceInFile()
- protected string getStandardFile()
- protected bool customiseStandardFile()
- protected bool saveFile()
- protected mixed getCustomisationFile()
- protected void getReadMeComponent()
- protected void Configuration()
- protected void Contributing()
- protected void Documentation()
- protected void Requirements()
- protected void Installation()
- protected void Author()
- protected void Assistance()
- protected void SuggestedModules()
- // Inherited methods from BaseCommand
- public void __construct()
- public abstract void run()
- public void calculateType()
- public void setRepo()
- public void getError()
- protected void getName()
- protected void getNameWithoutSilverstripe()
- protected void logError()
- protected void hasError()
Hierarchy
Members
private
- $enabled
—
Sunnysideup\ModuleChecks\Commands\FilesToAdd\bool
should it be included by default?
protected
- $errorString
- $fileLocation
- $fileLocation
—
string
root dir for module e.g. - $gitReplaceArray
- $replaceArray
- $repo
- $repo
- $rootDirForModule
—
string
root dir for module e.g. /var/www/modules/mymodule no final slash - $sourceLocation
- $sourceLocation
—
string
e.g. - $useCustomisationFile
Methods
public
- getDescription() — what does it do?
Inherited from Sunnysideup\ModuleChecks\Commands\FilesToAddAbstract
protected
- Assistance()
- Author()
- Configuration()
- Contributing()
- Documentation()
- Installation()
- Requirements()
- SuggestedModules()
- checkFolderPath()
- customiseStandardFile() — takes the standard file and adds any customisations to it from the module
- getCustomisationFile()
- getFilePath()
- getReadMeComponent()
- getStandardFile() — you can either return the string from the `$sourceLocation` or you can just have a string here that returns the data directly....
- saveFile() — writes the file
public
- compareWithText()
- getDescription()
- getFileLocation()
- replaceInFile()
- replaceWordsInFile()
- replaceWordsInText()
- run()
- setFileLocation()
- setRootDirForModule()
- setSourceLocation()