File: D:/HostingSpaces/bomacon/bomacon.nl/app/Components/Attributables/AttributableServiceInterface.php
<?php
namespace App\Components\Attributables;
use App\Attributes\ComponentArea;
use App\Components\Component\ComponentSaveState;
use App\Components\ComponentType\Types\AbstractComponentType;
/**
* Class AttributableableService
*
* Knows which models (Attributables) are linked to specific component attributes.
* So that it can save and load those models to these components
*/
interface AttributableServiceInterface
{
/**
* @param ComponentArea $componentArea
* @param AbstractComponentType $componentType
* @param int $component_id_before_save
* @param int $component_id_after_save
*/
public function saveAttributablesForComponentAttributes(
ComponentArea $componentArea,
AbstractComponentType $componentType,
int $component_id_before_save,
int $component_id_after_save
);
/**
* @param ComponentSaveState $componentSaveState
* @param ComponentArea $componentArea
* @param AbstractComponentType $componentType
* @param int $component_id_before_save
*/
public function removeAttributableAttributesFromComponentSaveState(
ComponentSaveState $componentSaveState,
ComponentArea $componentArea,
AbstractComponentType $componentType,
int $component_id_before_save
);
/**
* @param ComponentSaveState $componentSaveState
* @param int $component_id
* @return ComponentSaveState
*/
public function loadAttributablesForComponentAttributes(
ComponentSaveState $componentSaveState,
int $component_id
): ComponentSaveState;
public static function deleteOrphanedComponentsAttributables(): void;
}