public function addFieldCollection($type, $fieldname = null)
{
if (empty($type)) {
throw new \Exception("No fieldcollectiontype given");
}
Object\Fieldcollection\Definition::getByKey($type);
$this->fieldCollectionConfigs[] = ["type" => $type, "fieldname" => $fieldname];
}