src/Creation/CapGenerator.php
public function createCrop(OwnField $field, $crop_name, ImageItem $original)
    {
        if(!$this->imageItemFactory)
        {
            throw new ImageAggrException('Для генератора заглушек не установлена фабрика элементов!');
        }

        $type = $field->getFieldType();
        $subs = $type->getSubs('original');
        $cropType = $subs->getSub('crop');

        $cropItem  = $this->imageItemFactory->createCrop($cropType, ['name' => $crop_name], true);

        $cropSetting = $this->settingsSet->getImage($field)->getCrop($crop_name);

        $cropItem->getRef('original')->setItem($original);

        $man_name = $cropSetting->getMan()->getName();
        $target_name = $cropSetting->getTarget()->getName();

        $cropItem->getRef('man')->setItem($original->getResize($man_name));
        $cropItem->getRef('target')->setItem($original->getResize($target_name));

        return $cropItem;
    }
public function createCrop(OwnField $field, $crop_name, ImageItem $original)
    {
        if(!$this->imageItemFactory)
        {
            throw new ImageAggrException('Для генератора заглушек не установлена фабрика элементов!');
        }

        $type = $field->getFieldType();
        $subs = $type->getSubs('original');
        $cropType = $subs->getSub('crop');

        $cropItem  = $this->imageItemFactory->createCrop($cropType, ['name' => $crop_name], true);

        $cropSetting = $this->settingsSet->getImage($field)->getCrop($crop_name);

        $cropItem->getRef('original')->setItem($original);

        $man_name = $cropSetting->getMan()->getName();
        $target_name = $cropSetting->getTarget()->getName();

        $cropItem->getRef('man')->setItem($original->getResize($man_name));
        $cropItem->getRef('target')->setItem($original->getResize($target_name));

        return $cropItem;
    }
@param \Interpro\Core\Contracts\Taxonomy\Fields\OwnField $field
@param string $crop_name
@param \Interpro\ImageAggr\Items\ImageItem $original

@return \Interpro\ImageAggr\Items\CropItem