private function generateForm()
{
$fields = array();
// Loop over all attributes now.
foreach ($this->metaModel->getAttributes() as $attribute) {
$attrId = $attribute->get('id');
if (!$this->accepts($attribute)) {
continue;
}
if ($this->knowsAttribute($attribute)) {
if ($this->input->hasValue('attribute_' . $attrId)) {
$fields[] = array('checkbox' => false, 'text' => $this->translator->translate('addAll_addsuccess', static::$table, array($attribute->getName())), 'class' => 'tl_confirm', 'attr_id' => $attrId);
continue;
}
$fields[] = array('checkbox' => false, 'text' => $this->translator->translate('addAll_alreadycontained', static::$table, array($attribute->getName())), 'class' => 'tl_info', 'attr_id' => $attrId);
continue;
}
$fields[] = array('checkbox' => true, 'text' => $this->translator->translate('addAll_willadd', static::$table, array($attribute->getName())), 'class' => 'tl_new', 'attr_id' => $attrId);
$this->template->hasCheckbox = true;
}
return $fields;
}