NerdsAndCompany\Schematic\Services\Fields::validateFieldModel PHP Метод

validateFieldModel() приватный Метод

Validates field type, throw error when it's incorrect.
private validateFieldModel ( Craft\FieldModel $field )
$field Craft\FieldModel
    private function validateFieldModel(FieldModel $field)
    {
        if (!$field->getFieldType()) {
            $fieldType = $field->type;
            $fieldType == 'Matrix' ? $this->addError("One of the field's types does not exist. Are you missing a plugin?") : $this->addError("Field type '{$fieldType}' does not exist. Are you missing a plugin?");
            throw new Exception('Failed to save field');
        }
    }