mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-24 02:52:01 +00:00
43 lines
893 B
PHP
43 lines
893 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Entities\Episode;
|
|
use App\Entities\Podcast;
|
|
use App\Libraries\HtmlHead;
|
|
use App\Libraries\RssFeed;
|
|
use Modules\Plugins\Core\BasePlugin;
|
|
|
|
class AcmeAllHooksPlugin extends BasePlugin
|
|
{
|
|
#[Override]
|
|
public function rssBeforeChannel(Podcast $podcast): void
|
|
{
|
|
$podcast->title = 'Podcast test';
|
|
}
|
|
|
|
#[Override]
|
|
public function rssAfterChannel(Podcast $podcast, RssFeed $channel): void
|
|
{
|
|
$channel->addChild('foo', 'bar');
|
|
}
|
|
|
|
#[Override]
|
|
public function rssBeforeItem(Episode $episode): void
|
|
{
|
|
$episode->title = 'Episode test';
|
|
}
|
|
|
|
#[Override]
|
|
public function rssAfterItem(Episode $episode, RssFeed $item): void
|
|
{
|
|
$item->addChild('efoo', 'ebar');
|
|
}
|
|
|
|
#[Override]
|
|
public function siteHead(HtmlHead $head): void
|
|
{
|
|
$head->tag('title', 'foo');
|
|
}
|
|
}
|