Initial Drupal 11 with DDEV setup

This commit is contained in:
gluebox
2025-10-08 11:39:17 -04:00
commit 89ef74b305
25344 changed files with 2599172 additions and 0 deletions

View File

@ -0,0 +1,36 @@
<?php
namespace Robo\Task\Logfile;
use Robo\Result;
/**
* Truncates a log (or any other) file
*
* ``` php
* <?php
* $this->taskTruncateLog(['logfile.log'])->run();
* // or use shortcut
* $this->_truncateLog(['logfile.log']);
*
* ?>
* ```
*/
class TruncateLog extends BaseLogfile
{
/**
* {@inheritdoc}
*/
public function run(): Result
{
foreach ($this->logfiles as $logfile) {
$this->filesystem->dumpFile($logfile, false);
if ($this->chmod) {
$this->filesystem->chmod($logfile, $this->chmod);
}
$this->printTaskInfo("Truncated {logfile}", ['logfile' => $logfile]);
}
return Result::success($this);
}
}