src/Executors/Synchronizer.php
public function sync(AType $type)
    {
        $type_name = $type->getName();

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

        if($type->getRank() === TypeRank::BLOCK)
        {
            $model = Block::where('name', '=', $type_name)->first();
            if(!$model)
            {
                $initializer = $this->initMediator->getAInitializer($type->getFamily());

                //Проинициализируется по текущему состоянию конфигурации, не надо синхронизировать
                $blockRef = $initializer->init($type);
            }
            else
            {
                $this->syncEntity($type, 0);
                $this->syncRefs($type, 0);
            }
        }
        elseif($type->getRank() === TypeRank::GROUP)
        {
            $collection = Group::where('name', '=', $type_name)->get();

            foreach($collection as $item)
            {
                $this->syncEntity($type, $item->id);
                $this->syncRefs($type, $item->id);
            }
        }

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

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

        if($type->getRank() === TypeRank::BLOCK)
        {
            $model = Block::where('name', '=', $type_name)->first();
            if(!$model)
            {
                $initializer = $this->initMediator->getAInitializer($type->getFamily());

                //Проинициализируется по текущему состоянию конфигурации, не надо синхронизировать
                $blockRef = $initializer->init($type);
            }
            else
            {
                $this->syncEntity($type, 0);
                $this->syncRefs($type, 0);
            }
        }
        elseif($type->getRank() === TypeRank::GROUP)
        {
            $collection = Group::where('name', '=', $type_name)->get();

            foreach($collection as $item)
            {
                $this->syncEntity($type, $item->id);
                $this->syncRefs($type, $item->id);
            }
        }

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

@return \Interpro\Core\Contracts\Ref\ARef