src/CoreBundle/Controller/Backend/AbstractAddAllController.php
private function generateForm($table, $metaModel, Request $request)
    {
        $fields = [];
        // Loop over all attributes now.
        foreach ($metaModel->getAttributes() as $attribute) {
            $attrId = $attribute->get('id');
            if (!$this->accepts($attribute)) {
                continue;
            }
            if ($this->knowsAttribute($attribute)) {
                $fields[] = [
                    'checkbox' => false,
                    'text'     => $this->checkboxCaption('addAll_alreadycontained', $table, $attribute),
                    'class'    => 'tl_info',
                    'attr_id'  => $attrId,
                    'name'     => 'attribute_' . $attrId
                ];
                continue;
            } elseif ($this->isAttributeSubmitted($attrId, $request)) {
                $fields[] = array(
                    'checkbox' => false,
                    'text'     => $this->checkboxCaption('addAll_addsuccess', $table, $attribute),
                    'class'    => 'tl_confirm',
                    'attr_id'  => $attrId,
                    'name'     => 'attribute_' . $attrId
                );
                continue;
            }
            $fields[] = [
                'checkbox' => true,
                'text'     => $this->checkboxCaption('addAll_willadd', $table, $attribute),
                'class'    => 'tl_new',
                'attr_id'  => $attrId,
                'name'     => 'attribute_' . $attrId
            ];
        }

        return $fields;
    }
private function generateForm($table, $metaModel, Request $request)
    {
        $fields = [];
        // Loop over all attributes now.
        foreach ($metaModel->getAttributes() as $attribute) {
            $attrId = $attribute->get('id');
            if (!$this->accepts($attribute)) {
                continue;
            }
            if ($this->knowsAttribute($attribute)) {
                $fields[] = [
                    'checkbox' => false,
                    'text'     => $this->checkboxCaption('addAll_alreadycontained', $table, $attribute),
                    'class'    => 'tl_info',
                    'attr_id'  => $attrId,
                    'name'     => 'attribute_' . $attrId
                ];
                continue;
            } elseif ($this->isAttributeSubmitted($attrId, $request)) {
                $fields[] = array(
                    'checkbox' => false,
                    'text'     => $this->checkboxCaption('addAll_addsuccess', $table, $attribute),
                    'class'    => 'tl_confirm',
                    'attr_id'  => $attrId,
                    'name'     => 'attribute_' . $attrId
                );
                continue;
            }
            $fields[] = [
                'checkbox' => true,
                'text'     => $this->checkboxCaption('addAll_willadd', $table, $attribute),
                'class'    => 'tl_new',
                'attr_id'  => $attrId,
                'name'     => 'attribute_' . $attrId
            ];
        }

        return $fields;
    }
Generate the form.

@param string     $table     The table name.
@param IMetaModel $metaModel The MetaModel name.
@param Request    $request   The request.

@return array