A lot of things.

This commit is contained in:
2026-06-08 16:25:52 +02:00
parent 8eb94ff05d
commit 4415a2e8c4
55 changed files with 995 additions and 163 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace RomhackPlaza\Master\Service\Club;
use RomhackPlaza\Master\Entity\Club;
use XF\App;
use XF\Entity\Forum;
use XF\Entity\Node;
use XF\Http\Upload;
use XF\Service\AbstractService;
use XF\Service\ValidateAndSavableTrait;
use XF\Util\File;
class DeleterService extends AbstractService
{
/**
* @var Club
*/
protected $club;
public function __construct(App $app, Club $club)
{
parent::__construct($app);
$this->club = $club;
}
public function delete()
{
if( $this->club->Forum && $this->club->Forum->Node ){
$this->club->Forum->Node->delete();
}
$path = 'data://club_banners/' . $this->club->club_id . '.jpg';
File::deleteFromAbstractedPath($path);
$this->club->delete();
}
}