mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-04 06:36:51 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			787 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			787 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Traits\Filament;
 | 
						|
 | 
						|
use Filament\Resources\Pages\PageRegistration;
 | 
						|
 | 
						|
trait CanCustomizePages
 | 
						|
{
 | 
						|
    /** @var array<string, PageRegistration> */
 | 
						|
    protected static array $customPages = [];
 | 
						|
 | 
						|
    /** @param array<string, PageRegistration> $customPages */
 | 
						|
    public static function registerCustomPages(array $customPages): void
 | 
						|
    {
 | 
						|
        static::$customPages = array_merge(static::$customPages, $customPages);
 | 
						|
    }
 | 
						|
 | 
						|
    /** @return array<string, PageRegistration> */
 | 
						|
    public static function getDefaultPages(): array
 | 
						|
    {
 | 
						|
        return [];
 | 
						|
    }
 | 
						|
 | 
						|
    /** @return array<string, PageRegistration> */
 | 
						|
    public static function getPages(): array
 | 
						|
    {
 | 
						|
        return array_unique(array_merge(static::getDefaultPages(), static::$customPages), SORT_REGULAR);
 | 
						|
    }
 | 
						|
}
 |