Skip to content

Commit

Permalink
Merge pull request #722 from hydephp/add-dynamic-page-interface
Browse files Browse the repository at this point in the history
Add a DynamicPage interface to denote pages without a source file
  • Loading branch information
caendesilva authored Dec 2, 2022
2 parents b95756a + 4e726ec commit ff89c8a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Hyde\Framework\Features\Publications\PublicationService;
use Hyde\Hyde;
use Hyde\Pages\BladePage;
use Hyde\Support\Contracts\DynamicPage;
use Illuminate\Support\Facades\Blade;
use InvalidArgumentException;
use function str_contains;
Expand All @@ -17,7 +18,7 @@
* @see \Hyde\Pages\PublicationPage
* @see \Hyde\Framework\Testing\Feature\PublicationListPageTest
*/
class PublicationListPage extends BladePage
class PublicationListPage extends BladePage implements DynamicPage
{
public static string $sourceDirectory = '__publications';
public static string $outputDirectory = '';
Expand Down
13 changes: 13 additions & 0 deletions packages/framework/src/Support/Contracts/DynamicPage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types=1);

namespace Hyde\Support\Contracts;

/**
* This interface is used to mark page classes that are dynamically generated (i.e. not based on a source file).
*/
interface DynamicPage
{
//
}

0 comments on commit ff89c8a

Please sign in to comment.