Registers all the field groups added
@author Tim Perry
178786
public function hookUp()
    {

        $this->hookables->rewind();
        while ($this->hookables->valid()) {

            $hookable = $this->hookables->current();
            $hookable->hookUp();

            $this->hookables->next();

        }

    }
1160011
public function addField($field, $fieldset = null, $group = null)
    {
        return $this->form->addField($field, $fieldset, $group);
    }
378598
public void addGroupBy(String[] fieldNames)
    {
        for (int i = 0; i < fieldNames.length; i++)
        {
            addGroupBy(fieldNames[i]);
        }
    }
270645
public function organizeFieldsByGroup($fields)
    {
        $array = [];

        foreach ($fields as $field) {
            // $field should never be an instance of LeadField... old plugin BC here.
            if ($field instanceof LeadField) {
                $alias = $field->getAlias();
                if ($field->isPublished() and 'Company' !== $field->getObject()) {
                    $group                           = $field->getGroup();
                    $array[$group][$alias]['id']     = $field->getId();
                    $array[$group][$alias]['group']  = $group;
                    $array[$group][$alias]['label']  = $field->getLabel();
                    $array[$group][$alias]['alias']  = $alias;
                    $array[$group][$alias]['type']   = $field->getType();
                    $array[$group][$alias]['object'] = $field->getObject();
                }
            } else {
                if (
                    (isset($field['isPublished']) && $field['isPublished']) ||
                    // @todo - "is_published" shouldn't be used anymore, confirm:
                    (isset($field['is_published']) && $field['is_published']) &&
                    in_array($field['object'], ['lead', 'extendedField', 'extendedFieldSecure'])
                ) {
                    $alias = $field['alias'];
                    // @todo - "field_group" shouldn't be used anymore, confirm:
                    $group                           = isset($field['group']) ? $field['group'] : $field['field_group'];
                    $array[$group][$alias]['id']     = $field['id'];
                    $array[$group][$alias]['group']  = $group;
                    $array[$group][$alias]['label']  = $field['label'];
                    $array[$group][$alias]['alias']  = $alias;
                    $array[$group][$alias]['type']   = $field['type'];
                    $array[$group][$alias]['object'] = $field['object'];
                }
            }
        }// in_array($field['object'], ['lead', 'extendedField', 'extendedFieldSecure'])

        //make sure each group key is present
        $groups = ['core', 'social', 'personal', 'professional'];
        foreach ($groups as $g) {
            if (!isset($array[$g])) {
                $array[$g] = [];
            }
        }

        return $array;
    }
473350
public function register_settings() {
		// Register fields.
		$field_data = self::get_field_data();
		foreach ( $field_data as $field_id => $field ) {
			$this->fields[] = Carbon_Breadcrumb_Admin_Settings_Field::factory( $field['type'], 'carbon_breadcrumbs_' . $field_id, $field['title'], self::get_page_name() );
		}
	}
1356091
public function addGroupToNews()
    {
        $aAddGroups = $this->_getActionIds('oxgroups.oxid');
        $soxId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid');

        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('all')) {
            $sGroupTable = $this->_getViewName('oxgroups');
            $aAddGroups = $this->_getAll($this->_addFilter("select $sGroupTable.oxid " . $this->_getQuery()));
        }

        if ($soxId && $soxId != "-1" && is_array($aAddGroups)) {
            foreach ($aAddGroups as $sAddgroup) {
                $oNewGroup = oxNew(\OxidEsales\Eshop\Application\Model\Object2Group::class);
                $oNewGroup->oxobject2group__oxobjectid = new \OxidEsales\Eshop\Core\Field($soxId);
                $oNewGroup->oxobject2group__oxgroupsid = new \OxidEsales\Eshop\Core\Field($sAddgroup);
                $oNewGroup->save();
            }
        }
    }
536158
function registerDefaultGroups() {
        $this->registerGroup(
            (new \CharlotteDunois\Livia\Commands\CommandGroup($this->client, 'commands', 'Commands', true)),
            (new \CharlotteDunois\Livia\Commands\CommandGroup($this->client, 'utils', 'Utilities', true))
        );
        
        return $this;
    }
416477
protected function addgroup_other(){
		$this->registerGroup(BLang::_('ADMIN_CONFIG_SYSTEMS_OTHER'),'other',array(
			new BConfigFieldPath(
				'WORK_RUBRIC_ID',
				BLang::_('ADMIN_CONFIG_SYSTEMS_WORK_RUBRIC')
				),
			new BConfigFieldPath(
				'AUTO_RUBRIC_ID',
				BLang::_('ADMIN_CONFIG_SYSTEMS_AUTO_RUBRIC')
				),
			new BConfigFieldPath(
				'DOM_RUBRIC_ID',
				BLang::_('ADMIN_CONFIG_SYSTEMS_DOM_RUBRIC')
				),
			new BConfigFieldInt(
				'NEWS_HITS_DIVISOR',
				BLang::_('ADMIN_CONFIG_SYSTEMS_NEWS_HITS_DIVISOR'),
				1
				),
			new BConfigFieldInt(
				'CLASSIFIED_HITS_DIVISOR',
				BLang::_('ADMIN_CONFIG_SYSTEMS_CLASSIFIED_HITS_DIVISOR'),
				1
				),
			new BConfigFieldInt(
				'FIRMS_FIRM_HITS_DIVISOR',
				BLang::_('ADMIN_CONFIG_SYSTEMS_FIRMS_FIRM_HITS_DIVISOR'),
				1
				),
			new BConfigFieldInt(
				'NEWAUTOS_HITS_DIVISOR',
				'Делитель просмотров новых авто',
				1
				),
			new BConfigFieldInt(
				'CHIPS_PRICE',
				BLang::_('ADMIN_CONFIG_SYSTEMS_CLASSIFIED_CHIPS_PRICE'),
				1
				),
			new BConfigFieldPath(
				'IMPORT_DIRECTORY_IMPORT',
				BLang::_('ADMIN_CONFIG_SYSTEMS_IMPORT_DIRECTORY_IMPORT')
				),
			new BConfigFieldPath(
				'IMPORT_DIRECTORY_SUCCESS',
				BLang::_('ADMIN_CONFIG_SYSTEMS_IMPORT_DIRECTORY_SUCCESS')
				),
			new BConfigFieldPath(
				'IMPORT_DIRECTORY_FAIL',
				BLang::_('ADMIN_CONFIG_SYSTEMS_IMPORT_DIRECTORY_FAIL')
				),
			new BConfigFieldInt(
				'CLASSIFIED_SEARCH_DELETE_DAYS',
				BLang::_('ADMIN_CONFIG_CLASSIFIED_SEARCH_DELETE_DAYS'),
				10
				),
			));
		}
146348
protected function registerMetaFields()
    {
        $this->container
            ->share(GraphQL::SCHEMA_META_FIELD_DEFINITION, function ($__Schema) {
                return newField([
                    'name'        => '__schema',
                    'description' => 'Access the current type schema of this server.',
                    'type'        => newNonNull($__Schema),
                    'resolve'     => function ($source, $args, $context, ResolveInfo $info): Schema {
                        return $info->getSchema();
                    },
                ]);
            })
            ->addArgument(GraphQL::SCHEMA_INTROSPECTION);

        $this->container
            ->share(GraphQL::TYPE_META_FIELD_DEFINITION, function ($__Type) {
                return newField([
                    'name'        => '__type',
                    'description' => 'Request the type information of a single type.',
                    'type'        => $__Type,
                    'args'        => ['name' => ['type' => newNonNull(stringType())]],
                    'resolve'     => function ($source, $args, $context, ResolveInfo $info): ?TypeInterface {
                        ['name' => $name] = $args;
                        return $info->getSchema()->getType($name);
                    },
                ]);
            })
            ->addArgument(GraphQL::TYPE_INTROSPECTION);

        $this->container
            ->share(GraphQL::TYPE_NAME_META_FIELD_DEFINITION, function () {
                return newField([
                    'name'        => '__typename',
                    'description' => 'The name of the current Object type at runtime.',
                    'type'        => newNonNull(stringType()),
                    'resolve'     => function ($source, $args, $context, ResolveInfo $info): string {
                        return $info->getParentType()->getName();
                    },
                ]);
            });
    }
1361677
function register_taxonomies() {

        if ( is_array( $this->taxonomy_settings ) ) {

            // Foreach taxonomy registered with the post type.
            foreach ( $this->taxonomy_settings as $taxonomy_name => $options ) {

                // Register the taxonomy if it doesn't exist.
                if ( ! taxonomy_exists( $taxonomy_name ) ) {

                    // Register the taxonomy with Wordpress
                    register_taxonomy( $taxonomy_name, $this->post_type_name, $options );

                } else {

                    // If taxonomy exists, register it later with register_exisiting_taxonomies
                    $this->exisiting_taxonomies[] = $taxonomy_name;
                }
            }
        }
    }
1338608
public function addField(Field ...$fields)
    {
        collect($fields)->map(function ($field) {
            $this->group['fields']->put($field->key(), $field->get());
        });

        return $this;
    }
1015933
function register_exisiting_taxonomies() {

        if( is_array( $this->exisiting_taxonomies ) ) {
            foreach( $this->exisiting_taxonomies as $taxonomy_name ) {
                register_taxonomy_for_object_type( $taxonomy_name, $this->post_type_name );
            }
        }
    }
573773
public static function registerBuiltinFields()
    {
        $map = [
            'button'         => Field\Button::class,
            'checkbox'       => Field\Checkbox::class,
            'color'          => Field\Color::class,
            'currency'       => Field\Currency::class,
            'date'           => Field\Date::class,
            'dateRange'      => Field\DateRange::class,
            'datetime'       => Field\Datetime::class,
            'dateTimeRange'  => Field\DatetimeRange::class,
            'datetimeRange'  => Field\DatetimeRange::class,
            'decimal'        => Field\Decimal::class,
            'display'        => Field\Display::class,
            'divider'        => Field\Divide::class,
            'divide'         => Field\Divide::class,
            'embeds'         => Field\Embeds::class,
            'editor'         => Field\Editor::class,
            'email'          => Field\Email::class,
            'file'           => Field\File::class,
            'hasMany'        => Field\HasMany::class,
            'hidden'         => Field\Hidden::class,
            'id'             => Field\Id::class,
            'image'          => Field\Image::class,
            'ip'             => Field\Ip::class,
            'map'            => Field\Map::class,
            'mobile'         => Field\Mobile::class,
            'month'          => Field\Month::class,
            'multipleSelect' => Field\MultipleSelect::class,
            'number'         => Field\Number::class,
            'password'       => Field\Password::class,
            'radio'          => Field\Radio::class,
            'rate'           => Field\Rate::class,
            'select'         => Field\Select::class,
            'slider'         => Field\Slider::class,
            'switch'         => Field\SwitchField::class,
            'text'           => Field\Text::class,
            'textarea'       => Field\Textarea::class,
            'time'           => Field\Time::class,
            'timeRange'      => Field\TimeRange::class,
            'url'            => Field\Url::class,
            'year'           => Field\Year::class,
            'html'           => Field\Html::class,
            'tags'           => Field\Tags::class,
            'icon'           => Field\Icon::class,
            'multipleFile'   => Field\MultipleFile::class,
            'multipleImage'  => Field\MultipleImage::class,
            'captcha'        => Field\Captcha::class,
            'listbox'        => Field\Listbox::class,
            'table'          => Field\Table::class,
        ];

        foreach ($map as $abstract => $class) {
            static::extend($abstract, $class);
        }
    }
1175519
public function registerAll()
    {
        /** @var LanguageService $service */
        $service   = resolve(LanguageService::class);
        $languages = $service->getAllEnabled();
        foreach ($this->routes['ml'] as $value) {
            foreach ($languages as $language) {
                $prefix = null;
                if (!$language->is_default) {
                    $prefix = $language->code;
                }
                Route::group(
                    array_merge(['prefix' => $prefix], $value['groupArgs']),
                    function ($router) use ($value, $language) {
                        $value['closure']($router, $language->code);
                    }
                );
            }
        }
        foreach ($this->routes['regular'] as $value) {
            Route::group(
                $value['groupArgs'],
                function ($router) use ($value) {
                    $value['closure']($router);
                }
            );
        }
        if (!empty($this->routes['catchAll'])) {
            Route::group(
                $this->routes['catchAll']['groupArgs'],
                function ($router) {
                    $this->routes['catchAll']['closure']($router);
                }
            );
        }

        $router = resolve('router');
        $router->getRoutes()->refreshActionLookups();
        $router->getRoutes()->refreshNameLookups();
    }
187530
def register_all(module, exclude=[], AdminClass=admin.ModelAdmin):
    
    member_names = dir(module)

    for member_name in member_names:
        obj = getattr(module, member_name, None)
        if isinstance(obj, ModelBase) \
            and obj not in exclude \
            and not obj._meta.abstract:
            try:
                if hasattr(obj, 'localized_fields'):
                    admin.site.register(obj, L10n(obj, AdminClass))
                else:
                    admin.site.register(obj, AdminClass)
            except AlreadyRegistered:
                pass
999119
protected function addgroup_privat24(){
		$this->registerGroup(BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24'),'privat24',array(
			new BConfigFieldInt(
				'PAYMENT_PRIVAT24_MERCHANT_ID',
				BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_ID')),
			new BConfigFieldString(
				'PAYMENT_PRIVAT24_MERCHANT_PASS',
				BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_PASS')),
			new BConfigFieldList(
				'PAYMENT_PRIVAT24_MERCHANT_CURRENCY',
				BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_CURRENCY'),
				array(
					'UAH'=>'UAH',
					'USD'=>'USD',
					'EUR'=>'EUR',
					)
				),
			new BConfigFieldList(
				'PAYMENT_PRIVAT24_MERCHANT_ISTEST',
				BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_ISTEST'),
				array(
					0=>BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_ISTEST_0'),
					1=>BLang::_('ADMIN_CONFIG_PAYMENT_PRIVAT24_MERCHANT_ISTEST_1'),
					),
				0
				),

			));
		
		}
1277490
public function addQueryFields($fields)
    {
        /** @var DMSDocument $doc */
        $doc = singleton('DMSDocument');
        /** @var FormField $field */
        $dmsDocFields = $doc->scaffoldSearchFields(array('fieldClasses' => true));
        $membersMap = Member::get()->map('ID', 'Name')->toArray();
        asort($membersMap);

        foreach ($dmsDocFields as $field) {
            if ($field instanceof ListboxField) {
                $map = ($field->getName() === 'Tags__ID') ? $doc->getAllTagsMap() : $membersMap;
                $field->setMultiple(true)->setSource($map);

                if ($field->getName() === 'Tags__ID') {
                    $field->setRightTitle(
                        _t(
                            'DMSDocumentSet.TAGS_RIGHT_TITLE',
                            'Tags can be set in the taxonomy area, and can be assigned when editing a document.'
                        )
                    );
                }
            }
        }
        $keyValPairs = DMSJsonField::create('KeyValuePairs', $dmsDocFields->toArray());

        // Now lastly add the sort fields
        $sortedBy = FieldGroup::create('SortedBy', array(
            DropdownField::create('SortBy', '', array(
                'LastEdited'  => 'Last changed',
                'Created'     => 'Created',
                'Title'       => 'Document title',
            ), 'LastEdited'),
            DropdownField::create(
                'SortByDirection',
                '',
                array(
                    'DESC' => _t('DMSDocumentSet.DIRECTION_DESCENDING', 'Descending'),
                    'ASC' => _t('DMSDocumentSet.DIRECTION_ASCENDING', 'Ascending')
                ),
                'DESC'
            ),
        ));

        $sortedBy->setTitle(_t('DMSDocumentSet.SORTED_BY', 'Sort the document set by:'));
        $fields->addFieldsToTab(
            'Root.QueryBuilder',
            array(
                LiteralField::create(
                    'GridFieldNotice',
                    '<p class="message warning">' . _t(
                        'DMSDocumentSet.QUERY_BUILDER_NOTICE',
                        'The query builder provides the ability to add documents to a document set based on the ' .
                        'filters below. Please note that the set will be built using this criteria when you save the ' .
                        'form. This set will not be dynamically updated (see the documentation for more information).'
                    ) . '</p>'
                ),
                $keyValPairs,
                $sortedBy
            )
        );
    }