NerdsAndCompany\Schematic\Models\MatrixField::populate PHP Method

populate() public method

public populate ( array $fieldDefinition, Craft\FieldModel $field, string $fieldHandle, Craft\FieldGroupModel $group = null )
$fieldDefinition array
$field Craft\FieldModel
$fieldHandle string
$group Craft\FieldGroupModel
    public function populate(array $fieldDefinition, FieldModel $field, $fieldHandle, FieldGroupModel $group = null)
    {
        parent::populate($fieldDefinition, $field, $fieldHandle, $group);
        /** @var MatrixSettingsModel $settingsModel */
        $settingsModel = $field->getFieldType()->getSettings();
        $settingsModel->setAttributes($fieldDefinition['settings']);
        $settingsModel->setBlockTypes($this->getBlockTypes($fieldDefinition, $field));
        $field->settings = $settingsModel;
    }