HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/debout/debout.nl/app/Components/Attributables/AttributableServiceInterface.php
<?php

namespace App\Components\Attributables;

use App\Components\Component\ComponentSaveState;
use App\Components\ComponentType\Types\AbstractComponentType;
use App\Attributes\ComponentArea;
use Komma\KMS\Core\Sections\AttributeKey;


/**
 * Class AttributableableService
 *
 * Knows which models (Attributables) are linked to specific component attributes.
 * So that it can save and load those models to these components
 *
 * @package App\Components\Component
 */
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;
}