Build fields var

@return void
555562
protected function buildMapperFields()
    {
        $fields       = array();
        $dataNamesMap = '';

        foreach ($this->columns as $column) {
            $field    = $column->getName();
            $fields[] = "        '" . $field . "'";
            $dataNamesMap .= "
        '" . $field . "' => array(
            'get'      => '" . $column->getMethodNameGet() . "',
            'set'      => '" . $column->getMethodNameSet() . "',
            'property' => '" . $column->getPropertyName() . "',
        ),";
        }

        $this->vars['db_fields']      = implode(",\n", $fields);
        $this->vars['data_names_map'] = $dataNamesMap;
    }
1031510
public function prepareVars()
    {
        $this->vars['cssClasses'] = implode(' ', $this->cssClasses);
        $this->vars['columns'] = $this->getVisibleColumns();
        $this->vars['columnTotal'] = $this->getTotalColumns();
        $this->vars['records'] = $this->getRecords();
        $this->vars['noRecordsMessage'] = trans($this->noRecordsMessage);
        $this->vars['showCheckboxes'] = $this->showCheckboxes;
        $this->vars['showSetup'] = $this->showSetup;
        $this->vars['showPagination'] = $this->showPagination;
        $this->vars['showPageNumbers'] = $this->showPageNumbers;
        $this->vars['showSorting'] = $this->showSorting;
        $this->vars['sortColumn'] = $this->getSortColumn();
        $this->vars['sortDirection'] = $this->sortDirection;
        $this->vars['showTree'] = $this->showTree;
        $this->vars['treeLevel'] = 0;

        if ($this->showPagination) {
            $this->vars['pageCurrent'] = $this->records->currentPage();
            // Store the currently visited page number in the session so the same
            // data can be displayed when the user returns to this list.
            $this->putSession('lastVisitedPage', $this->vars['pageCurrent']);
            if ($this->showPageNumbers) {
                $this->vars['recordTotal'] = $this->records->total();
                $this->vars['pageLast'] = $this->records->lastPage();
                $this->vars['pageFrom'] = $this->records->firstItem();
                $this->vars['pageTo'] = $this->records->lastItem();
            }
            else {
                $this->vars['hasMorePages'] = $this->records->hasMorePages();
            }
        }
        else {
            $this->vars['recordTotal'] = $this->records->count();
            $this->vars['pageCurrent'] = 1;
        }
    }
1013075
public function build()
    {
        $this->classMetadata->mergeExtension($this->getExtensionName(), [
            $this->key => $this->fieldName,
        ]);
    }
293730
protected function parseFields()
	{
		$this->fields = array();
		$matches      = array();

		// Get all of the available fields in the format string.
		preg_match_all('/{(.*?)}/i', $this->format, $matches);

		// Build the parsed fields list based on the found fields.
		foreach ($matches[1] as $match)
		{
			$this->fields[] = strtoupper($match);
		}
	}
310908
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, CLASS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, CLASS_INCLUDES_CLASS, 128, null, null);
    }
436007
private function buildFields($defaultFieldsValue) {
        $rawFields = $this->getRequest()->get('fields', null, $defaultFieldsValue);
        $fields = explode(',', $rawFields);
        $helper = new SplitHelper('.');
        $keyedFields = array_fill_keys($fields, null);
        $this->setField(new Field($helper->convert($keyedFields)));
    }
601443
private function buildFields()
    {
        $migrationTypes = FieldsDescriber::migration();
        $used           = [];
        $fields         = '$table->increments("id");' . "\r\n";
        foreach ($this->fields as $field) {
            // Check if there is no duplication for radio and checkbox
            if (!in_array($field->title, $used)) {
                // Generate our migration line
                $migrationLine = str_replace([
                    '$FIELDNAME$',
                    '$STATE$',
                    '$RELATIONSHIP$',
                ], [
                    $field->title,
                    $field->default == 'true' ? 1 : 0,
                    $field->relationship_name
                ], $migrationTypes[$field->type]);
                $fields .= '            '; // Add formatting space to the migration
                if ($field->type == 'enum') {
                    $values      = '';
                    $field->enum = explode(',', $field->enum);
                    foreach ($field->enum as $val) {
                        // Remove first whitespace
                        if (strpos(substr($val, 0, 1), ' ') !== false) {
                            $len = strlen($val);
                            $val = substr($val, 1, $len);
                        }
                        $values .= '"' . $val . '"';
                        if ($val != last($field->enum)) {
                            $values .= ', ';
                        }
                    }
                    $migrationLine = str_replace('$VALUES$', $values, $migrationLine);
                }
                $fields .= '$table->' . $migrationLine;
                if (in_array($field->validation, FieldsDescriber::nullables())) {
                    $fields .= '->nullable()';
                }
                $fields .= ";\r\n";
                if ($field->type == 'relationship') {
                    $used[$field->relationship_name] = $field->relationship_name;
                } else {
                    $used[$field->title] = $field->title;
                }
            }
        }
        $fields .= '            '; // Add formatting space to the migration
        $fields .= '$table->timestamps();';
        if ($this->soft == 1) {
            $fields .= "\r\n";
            $fields .= '            '; // Add formatting space to the migration
            $fields .= '$table->softDeletes();';
        }

        return $fields;
    }
1150429
public function prepareVars()
    {
        $this->populateTableWidget();
        $this->vars['table'] = $this->table;
        $this->vars['size'] = $this->size;
        $this->vars['rowSorting'] = $this->rowSorting;
    }
869794
private function buildOnConstruct() {
        $content = '';
        foreach($this->getFields() as $field) {
            if(in_array($field->getType(), array('Date', 'DateTime'))) {
                $content .= '		$this->set' . ucfirst($field->getShortName()) . '(new ' . $field->getType() . '($this->get' . ucfirst($field->getShortName()) . '()));
';
            }
        }
        $content .= '		parent::onConstruct();';
        $method = new Object\Method();
        $method->setAccess('public');
        $method->setDescription('Used to Construct an instance');
        $method->setName('onConstruct');
        $method->setReturnType('void');
        $method->setContent($content);
        $this->getAbstractClass()->addMethod($method);
    }
229855
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, CODE, 30, null, null);
        field = new FieldInfo(this, MESSAGE_PROCESS_INFO_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_TRANSPORT_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, MESSAGE_VERSION_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, ACTIVE, 10, null, new Boolean(true));
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, DEFAULT_TRANSPORT, 10, null, null);
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
    }
1084476
public function prepareVars()
    {
        $this->vars['field'] = $this->formField;
        $this->vars['editorLang'] = $this->getValidEditorLang();
        $this->vars['fullPage'] = $this->fullPage;
        $this->vars['stretch'] = $this->formField->stretch;
        $this->vars['size'] = $this->formField->size;
        $this->vars['readOnly'] = $this->readOnly;
        $this->vars['name'] = $this->getFieldName();
        $this->vars['value'] = $this->getLoadValue();
        $this->vars['toolbarButtons'] = $this->evalToolbarButtons();

        $this->vars['globalToolbarButtons'] = EditorSetting::getConfigured('html_toolbar_buttons');
        $this->vars['allowEmptyTags'] = EditorSetting::getConfigured('html_allow_empty_tags');
        $this->vars['allowTags'] = EditorSetting::getConfigured('html_allow_tags');
        $this->vars['noWrapTags'] = EditorSetting::getConfigured('html_no_wrap_tags');
        $this->vars['removeTags'] = EditorSetting::getConfigured('html_remove_tags');
        $this->vars['lineBreakerTags'] = EditorSetting::getConfigured('html_line_breaker_tags');

        $this->vars['imageStyles'] = EditorSetting::getConfiguredStyles('html_style_image');
        $this->vars['linkStyles'] = EditorSetting::getConfiguredStyles('html_style_link');
        $this->vars['paragraphStyles'] = EditorSetting::getConfiguredStyles('html_style_paragraph');
        $this->vars['tableStyles'] = EditorSetting::getConfiguredStyles('html_style_table');
        $this->vars['tableCellStyles'] = EditorSetting::getConfiguredStyles('html_style_table_cell');
    }
360444
protected function setVars()
    {
        $this->getModel()->setFaIcon('fa-text-width');
        $this->getModel()->setStyle('css'.S.'text.css');
        $this->getModel()->setTemplate('text.html.twig');
    }
870886
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, START_DATE_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, END_DATE_TIME, 25, null, null);
        field.setDataClass(Date.class);
        field = new FieldInfo(this, DESCRIPTION, 60, null, null);
        field = new FieldInfo(this, REPEAT_INTERVAL_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, REPEAT_COUNT, 5, null, null);
        field.setDataClass(Short.class);
        field = new FieldInfo(this, CALENDAR_CATEGORY_ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field = new FieldInfo(this, HIDDEN, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field = new FieldInfo(this, PROPERTIES, Constants.DEFAULT_FIELD_LENGTH, null, null);
    }
724935
public function prepareVars()
    {
        $this->vars['search'] = $this->searchWidget ? $this->searchWidget->render() : '';
        $this->vars['cssClasses'] = implode(' ', $this->cssClasses);
        $this->vars['controlPanel'] = $this->makeControlPanel();
    }
688922
public function buildFields()
    {
        $this->addField('title', 'kuma_menu.menu_item.adminlist.field.title', false, 'KunstmaanMenuBundle:AdminList:menu-item-title.html.twig');
        $this->addField('online', 'kuma_menu.menu_item.adminlist.field.online', false, 'KunstmaanMenuBundle:AdminList:menu-item-online.html.twig');
        $this->addField('type', 'kuma_menu.menu_item.adminlist.field.type', false);
        $this->addField('url', 'kuma_menu.menu_item.adminlist.field.url', false, 'KunstmaanMenuBundle:AdminList:menu-item-url.html.twig');
        $this->addField('newWindow', 'kuma_menu.menu_item.adminlist.field.new_window', false);
    }
187544
protected function buildFields()
    {
        $this->debug->groupCollapsed(__METHOD__);
        $status = &$this->status;
        $persist = $this->persist;
        $pageI = $this->persist->get('i');
        $submitFieldCount = 0;
        $keys = \array_keys($this->currentFields);
        foreach ($keys as $k) {
            $field = $this->currentFields[$k];
            unset($this->currentFields[$k]);
            if (!\is_object($field)) {
                $field = $this->buildField($field, $k);
            }
            $field->pageI = $pageI;
            if ($field->attribs['type'] == 'newPage') {
                $this->debug->info('possible new page', $field->attribs['value']);
                if ($field->isRequired()) {
                    $this->debug->log('adding new page', $field->attribs['value']);
                    $status['additionalPages'][] = $field;
                }
                continue;
            } elseif ($field->attribs['type'] == 'submit') {
                $submitFieldCount++;
            } elseif ($field->attribs['type'] == 'file') {
                $status['multipart'] = true;
            }
            $k = \is_int($k)
                ? $field->attribs['name']
                : $k;
            $this->currentFields[$k] = $field;
        }
        if ($submitFieldCount < 1) {
            $this->debug->info('submit field not set');
            $fieldArray = array(
                'type'  => 'submit',
                'label' => ( !empty($status['additionalPages']) || $persist->pageCount() > $persist->pageCount(true)+1 )
                            ? 'Continue'
                            : 'Submit',
                'attribs' => array('class' => array('btn btn-primary', 'replace')),
                'tagOnly' => true,
            );
            $this->currentFields['submit'] = $this->fieldFactory->build($fieldArray);
            $this->debug->log('array_keys(currentFields)', \array_keys($this->currentFields));
        }
        if ($status['multipart']) {
            $this->debug->log('<a target="_blank" href="http://www.php.net/manual/en/ini.php">post_max_size</a> = '.Str::getBytes(\ini_get('post_max_size')));
            $this->debug->log('<a target="_blank" href="http://www.php.net/manual/en/ini.php">upload_max_filesize</a> = '.Str::getBytes(\ini_get('upload_max_filesize')));
        }
        $this->debug->groupEnd();
    }
773144
public void setupFields()
    {
        FieldInfo field = null;
        field = new FieldInfo(this, ID, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Integer.class);
        field.setHidden(true);
        field = new FieldInfo(this, LAST_CHANGED, Constants.DEFAULT_FIELD_LENGTH, null, null);
        field.setDataClass(Date.class);
        field.setHidden(true);
        field = new FieldInfo(this, DELETED, 10, null, new Boolean(false));
        field.setDataClass(Boolean.class);
        field.setHidden(true);
        field = new FieldInfo(this, KEY_FILENAME, 40, null, null);
        field = new FieldInfo(this, KEY_NUMBER, 2, null, null);
        field.setDataClass(Short.class);
        field = new FieldInfo(this, KEY_FIELD_1, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_2, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_3, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_4, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_5, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_6, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_7, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_8, 40, null, null);
        field = new FieldInfo(this, KEY_FIELD_9, 40, null, null);
        field = new FieldInfo(this, KEY_NAME, 40, null, null);
        field = new FieldInfo(this, KEY_TYPE, 1, null, null);
        field = new FieldInfo(this, INCLUDE_SCOPE, 10, null, new Integer(0x004));
        field.setDataClass(Integer.class);
    }