src/Executors/ModImagesSynchronizer.php
public function sync(AType $type)
    {
        $name = $type->getName();
        $mode = $type->getMode();

        if($name !== 'modimages' or $mode !== TypeMode::MODE_A)
        {
            throw new ImageAggrException('Синхронизатор предназначен для блока modimages(A), передано: '.$name.'('.$mode.')!');
        }

        //[[[
        DB::beginTransaction();

        $synchronizer = $this->syncMediator->getOwnSynchronizer('imageaggr');

        $aRef = new ARef($type, 0);

        $images = $type->getOwns('image');

        foreach($images as $image)
        {
            $synchronizer->sync($aRef, $image);
        }

        DB::commit();
        //]]]
    }
public function sync(AType $type)
    {
        $name = $type->getName();
        $mode = $type->getMode();

        if($name !== 'modimages' or $mode !== TypeMode::MODE_A)
        {
            throw new ImageAggrException('Синхронизатор предназначен для блока modimages(A), передано: '.$name.'('.$mode.')!');
        }

        //[[[
        DB::beginTransaction();

        $synchronizer = $this->syncMediator->getOwnSynchronizer('imageaggr');

        $aRef = new ARef($type, 0);

        $images = $type->getOwns('image');

        foreach($images as $image)
        {
            $synchronizer->sync($aRef, $image);
        }

        DB::commit();
        //]]]
    }
@param \Interpro\Core\Contracts\Taxonomy\Types\AType $type

@return void