feat(exclusions): Implement component exclusion system (Plan 99.11)
Adds ability to exclude components from specific: - Categories (by slug or term_id) - Post/Page IDs - URL patterns (substring or regex) Architecture: - Domain: Value Objects (CategoryExclusion, PostIdExclusion, UrlPatternExclusion, ExclusionRuleSet) + Contracts - Application: EvaluateExclusionsUseCase + EvaluateComponentVisibilityUseCase (orchestrator) - Infrastructure: WordPressExclusionRepository, WordPressPageContextProvider, WordPressServerRequestProvider - Admin: ExclusionFormPartial (reusable UI), ExclusionFieldProcessor, JS toggle The PageVisibilityHelper now uses the orchestrator UseCase that combines page-type visibility (Plan 99.10) with exclusion rules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
36
Shared/Domain/Contracts/ExclusionRepositoryInterface.php
Normal file
36
Shared/Domain/Contracts/ExclusionRepositoryInterface.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ROITheme\Shared\Domain\Contracts;
|
||||
|
||||
use ROITheme\Shared\Domain\ValueObjects\ExclusionRuleSet;
|
||||
|
||||
/**
|
||||
* Contrato para acceder a la configuracion de exclusiones
|
||||
*
|
||||
* Metodos: 3 (cumple ISP < 5 metodos)
|
||||
*
|
||||
* @package ROITheme\Shared\Domain\Contracts
|
||||
*/
|
||||
interface ExclusionRepositoryInterface
|
||||
{
|
||||
/**
|
||||
* Obtiene las exclusiones configuradas para un componente
|
||||
*
|
||||
* @param string $componentName Nombre del componente (kebab-case)
|
||||
* @return ExclusionRuleSet Configuracion de exclusiones
|
||||
*/
|
||||
public function getExclusions(string $componentName): ExclusionRuleSet;
|
||||
|
||||
/**
|
||||
* Guarda la configuracion de exclusiones de un componente
|
||||
*
|
||||
* @param ExclusionRuleSet $exclusions Configuracion a guardar
|
||||
*/
|
||||
public function saveExclusions(ExclusionRuleSet $exclusions): void;
|
||||
|
||||
/**
|
||||
* Verifica si existe configuracion de exclusiones para un componente
|
||||
*/
|
||||
public function hasExclusions(string $componentName): bool;
|
||||
}
|
||||
Reference in New Issue
Block a user