Set those settings needed for the detailed display

@return \Gems\Tracker\Model\FieldMaintenanceModel (continuation pattern)
555206
public function applyDetailSettings()
    {
        $this->applyBrowseSettings(true);

        $this->_addLoadDependency = true;

        $this->set('gtf_id_track',          'label', $this->_('Track'),
                'multiOptions', $this->util->getTrackData()->getAllTracks()
                );
        $this->set('gtf_field_description', 'label', $this->_('Description'),
                'description', $this->_('Optional extra description to show the user.')
                );
        $this->set('gtf_track_info_label',   'label', $this->_('Add name to description'));

        $this->set('htmlUse', 'label', ' ');

        // But do always transform gtf_calculate_using on load and save
        // as otherwise we might not be sure what to do
        $contact = new \MUtil_Model_Type_ConcatenatedRow(self::FIELD_SEP, '; ', false);
        $contact->apply($this, 'gtf_calculate_using');

        // Clean up data always show in browse view, but not always in detail views
        $this->set('gtf_create_track',    'label', null);

        $switches = array(
            0 => array(
                'gtf_track_info_label'     => array('elementClass' => 'Hidden', 'label' => null),
            ),
        );
        $this->addDependency(array('ValueSwitchDependency', $switches), 'gtf_to_track_info');
    }
1007156
public function applyDetailSettings()
    {
        $dbLookup   = $this->util->getDbLookup();
        $localized  = $this->util->getLocalized();
        $translated = $this->util->getTranslated();

        if ($this->loginCheck) {
            $this->addLoginCheck();
        }
        $this->resetOrder();
        if ($this->has('gr2o_id_organization')) {
            $this->set('gr2o_id_organization',
                    'label', $this->_('Organization'),
                    'tab', $this->_('Identification'),
                    'multiOptions', $this->currentUser->getRespondentOrganizations()
                    );

            $this->set('gr2o_id_organization', 'default', $this->currentUser->getCurrentOrganizationId());

            if (count($this->currentUser->getAllowedOrganizations()) == 1) {
                $this->set('gr2o_id_organization', 'elementClass', 'Exhibitor');
            }
        }

        // The SSN
        if ($this->hashSsn !== self::SSN_HIDE) {
            $this->set('grs_ssn', 'label', $this->_('SSN'),
                    'tab', $this->_('Identification'));
        }

        $this->setIfExists('gr2o_patient_nr', 'label', $this->_('Respondent number'),
                'tab', $this->_('Identification'));

        $this->setIfExists('grs_initials_name',  'label', $this->_('Initials'));
        $this->setIfExists('grs_first_name',  'label', $this->_('First name'));
        $this->setIfExists('grs_surname_prefix', 'label', $this->_('Surname prefix'),
                'description', $this->_('de, ibn, Le, Mac, von, etc...'));

        $this->setIfExists('grs_last_name',   'label', $this->_('Last name'));

        $this->setIfExists('grs_partner_surname_prefix', 'label', $this->_('Partner surname prefix'),
                'description', $this->_('de, ibn, Le, Mac, von, etc...'));
        $this->setIfExists('grs_partner_last_name',   'label', $this->_('Partner last name'));

        $this->setIfExists('grs_gender',      'label', $this->_('Gender'),
                'multiOptions', $translated->getGenderHello()
                );

        $this->setIfExists('grs_birthday',    'label', $this->_('Birthday'),
                'dateFormat', \Zend_Date::DATE_MEDIUM
                );

        $this->setIfExists('gr2o_email',       'label', $this->_('E-Mail'),
                'tab', $this->_('Contact information'));
        $this->setIfExists('gr2o_mailable',   'label', $this->_('May be mailed'),
                'elementClass', 'radio',
                'separator', ' ',
                'multiOptions', $translated->getYesNo()
                );

        $this->setIfExists('gr2o_treatment',  'label', $this->_('Treatment'));
        $this->setIfExists('gr2o_comments',   'label', $this->_('Comments'));

        $this->setIfExists('grs_address_1',   'label', $this->_('Street'));
        $this->setIfExists('grs_address_2',   'label', ' ');

        // \MUtil_Echo::track($this->getItemsOrdered(), $this->getOrder('gr2o_email'));

        $this->setIfExists('grs_zipcode',     'label', $this->_('Zipcode'));
        $this->setIfExists('grs_city',        'label', $this->_('City'));
        $this->setIfExists('grs_iso_country', 'label', $this->_('Country'),
                'multiOptions', $localized->getCountries());

        $this->setIfExists('grs_phone_1',     'label', $this->_('Phone'));
        $this->setIfExists('grs_phone_2',     'label', $this->_('Phone 2'));
        $this->setIfExists('grs_phone_3',     'label', $this->_('Phone 3'));
        $this->setIfExists('grs_phone_4',     'label', $this->_('Phone 4'));

        $this->setIfExists('grs_iso_lang',    'label', $this->_('Language'),
                'multiOptions', $localized->getLanguages(),
                'tab', $this->_('Settings'), 'default', $this->project->getLocaleDefault());

        $this->setIfExists('gr2o_consent',    'label', $this->_('Consent'),
                'default', $this->util->getDefaultConsent(),
                'description', $this->_('Has the respondent signed the informed consent letter?'),
                'multiOptions', $dbLookup->getUserConsents()
                );

        $changers = $this->getChangersList();

        $this->setIfExists('gr2o_opened',     'label', $this->_('Opened'),
                'dateFormat', \Zend_Date::DATE_MEDIUM,
                'default', '',
                'elementClass', 'None',  // Has little use to show: is usually editor
                'formatFunction', array($translated, 'formatDateTime')
                );
        $this->setIfExists('gr2o_opened_by',  'label', $this->_('Opened'),
                'elementClass', 'None',  // Has little use to show: is usually editor
                'multiOptions', $changers
                );
        $this->setIfExists('gr2o_changed',    'label', $this->_('Changed on'),
                'dateFormat', \Zend_Date::DATE_MEDIUM,
                'default', '',
                'formatFunction', array($translated, 'formatDateTime')
                );
        $this->setIfExists('gr2o_changed_by', 'label', $this->_('Changed by'),
                'multiOptions', $changers
                );
        $this->setIfExists('gr2o_created',    'label', $this->_('Creation date'),
                'dateFormat', \Zend_Date::DATE_MEDIUM,
                'default', '',
                'formatFunction', array($translated, 'formatDateTime')
                );
        $this->setIfExists('gr2o_created_by', 'label', $this->_('Creation by'),
                'multiOptions', $changers
                );

        return $this;
    }
291695
protected function setFrontendInstancies()
    {
        $this->price = $this->getInstance('gplcart\\core\\models\\Price');
        $this->trigger = $this->getInstance('gplcart\\core\\models\\Trigger');
        $this->product = $this->getInstance('gplcart\\core\\models\\Product');
        $this->wishlist = $this->getInstance('gplcart\\core\\models\\Wishlist');
        $this->category = $this->getInstance('gplcart\\core\\models\\Category');
        $this->currency = $this->getInstance('gplcart\\core\\models\\Currency');
        $this->cart_action = $this->getInstance('gplcart\\core\\models\\CartAction');
        $this->product_compare = $this->getInstance('gplcart\\core\\models\\ProductCompare');
        $this->wishlist_action = $this->getInstance('gplcart\\core\\models\\WishlistAction');
        $this->product_compare_action = $this->getInstance('gplcart\\core\\models\\ProductCompareAction');
    }
471344
public function setModel(\atk4\data\Model $m, $defaultFields = null)
    {
        if ($defaultFields !== null) {
            $this->fieldsDefault = $defaultFields;
        }

        parent::setModel($m, $this->fieldsRead ?: $this->fieldsDefault);
        $this->model->unload();

        if ($this->canCreate) {
            $this->initCreate();
        }

        if ($this->canUpdate) {
            $this->initUpdate();
        }

        if ($this->canDelete) {
            $this->initDelete();
        }

        return $this->model;
    }
1300629
public function getCMSFields()
    {
        $fields = parent::getCMSFields();
        $fields->addFieldsToTab(
            'Root.Main',
            array(
                DropdownField::create(
                    'ClassName',
                    _t('Placeable.TYPE', 'Type'),
                    singleton('RegionObject_Preset')->SubClassNames
                )->setEmptyString(_t('Placeable.NONE', 'None'))
            )
        );

        $fields->removeByName('PageTypes');
        $fields->addFieldsToTab(
            'Root.PageTypes',
            array(
                LabelField::create(
                    'PageTypesDescription',
                    _t('RegionObject_Preset.PAGETYPESDESCRIPTION', 'List of all page types that use this use this preset.')
                ),
                GridField::create(
                    'PageTypes',
                    _t('RegionObject_Preset.PAGETYPES', 'Page Types'),
                    $this->Objects(),
                    GridFieldConfig_Base::create()
                )
            )
        );

        $this->extend('updateCMSFields', $fields);
        return $fields;
    }
636705
public function setDefaultsFromConfiguration()
    {
        $set = [
            "urlType",
            "siteUrl",
            "baseUrl",
            "staticSiteUrl",
            "staticBaseUrl",
            "scriptName",
        ];
        
        foreach ($set as $item) {
            if (!isset($this->config[$item])) {
                continue;
            }
            
            $this->$item = $this->config[$item];
        }

        return $this;
    }
1055115
protected function setReferenceSource()
    {
        if (null !== $this->info->reference->source) {
            return $this;
        }

        // No source is set, see if we can find a standard match
        $matchAttributes = config('cms-models.analyzer.reference.sources', []);
        
        foreach ($matchAttributes as $matchAttribute) {

            if (array_key_exists($matchAttribute, $this->info->attributes)) {
                $this->info->reference->source = $matchAttribute;
                break;
            }
        }

        return $this;
    }
549096
protected function setBreadcrumbEditField()
    {
        $breadcrumbs = array();

        $breadcrumbs[] = array(
            'url' => $this->url('admin'),
            'text' => $this->text('Dashboard')
        );

        $breadcrumbs[] = array(
            'url' => $this->url('admin/content/field'),
            'text' => $this->text('Fields')
        );

        $this->setBreadcrumbs($breadcrumbs);
    }
1307431
protected function setData()
    {
        $this->initElementObject();
        if (empty($this->obElement)) {
            return;
        }

        //Set default lang (if update cache with non default lang)
        if (self::$bLangInit && !empty(self::$sDefaultLang) && $this->obElement->isClassExtendedWith('RainLab.Translate.Behaviors.TranslatableModel')) {
            $this->obElement->lang(self::$sDefaultLang);
        }

        //Get cached field list from model and add fields to cache array
        $this->setCachedFieldList();

        //Get element data
        $arResult = $this->getElementData();
        if (empty($arResult) || !is_array($arResult)) {
            $arResult = [];
        }

        //Add fields values to cached array
        foreach ($arResult as $sField => $sValue) {
            $this->setAttribute($sField, $sValue);
        }

        //Save lang properties (integration with Translate plugin)
        $this->setLangProperties();

        //Run methods from $arExtendResult array
        $this->setExtendData();
    }
309679
public function applyEditSettings()
    {
        $this->applyDetailSettings();
        $this->resetOrder();

        $yesNo = $this->util->getTranslated()->getYesNo();

        // GENERAL TAB
        $this->set('gor_name',
                'size', 25,
                'validator', $this->createUniqueValidator('gor_name')
                );
        $this->set('gor_location',
                'size', 50,
                'maxlength', 255
                );
        $this->set('gor_task',
                'size', 25);
        $this->set('gor_url',
                'size', 50
                );
        $this->setIfExists('gor_url_base',
                'size', 50,
                'filter', 'TrailingSlash'
                );
        $this->setIfExists('gor_code',
                'size', 10
                );
        $this->set('gor_provider_id');
        $this->setIfExists('gor_active',
                'elementClass', 'Checkbox'
                );

        // EMAIL TAB
        $this->set('gor_contact_name', 'tab', $this->_('Email') . ' & ' . $this->_('Token'),
                'order', $this->getOrder('gor_active') + 1000,
                'size', 25
                );
        $this->set('gor_contact_email',
                'size', 50,
                'validator', 'SimpleEmail'
                );
        $this->set('gor_mail_watcher', 'label', $this->_('Check cron job mail'),
                    'description', $this->_('If checked the organization contact will be mailed when the cron job does not run on time.'),
                    'elementClass', 'Checkbox',
                    'multiOptions', $yesNo
                    );
        $this->set('gor_welcome',
                'elementClass', 'Textarea',
                'rows', 5
                );
        $this->set('gor_signature',
                'elementClass', 'Textarea',
                'rows', 5
                );
        $this->set('gor_create_account_template');
        $this->set('gor_reset_pass_template');

        // ACCESS TAB
        $this->set('gor_has_login',  'tab', $this->_('Access'),
                'order', $this->getOrder('gor_reset_pass_template') + 1000,
                'elementClass', 'CheckBox'
                );
        $this->set('gor_add_respondents',
                'elementClass', 'CheckBox'
                );
        $this->set('gor_has_respondents',
                'elementClass', 'Exhibitor'
                );
        $this->set('gor_respondent_group');
        $this->set('gor_accessible_by',
                'elementClass', 'MultiCheckbox'
                );
        $this->set('allowed',
                'label', $this->_('Can access'),
                'elementClass', 'Html'
                );

        $this->setIfExists('gor_allowed_ip_ranges',
            'elementClass', 'Textarea',
            'rows', 4,
            'validator', new \Gems_Validate_IPRanges()
            );
        $this->setIfExists('gor_user_class');

        $definitions = $this->get('gor_user_class', 'multiOptions');
        if ($definitions && (count($definitions) > 1)) {
            reset($definitions);
            // MD: Removed onchange because it does not play nice with the processAfterLoad and save methods in this class
            //     @@TODO: See if we can enable it when these methods are changed into a dependency
            $this->setIfExists('gor_user_class', 'default', key($definitions), 'required', true/*, 'onchange', 'this.form.submit();'*/);
        }

        // INTERFACE TAB
        $this->setIfExists('gor_respondent_edit', 'tab', $this->_('Interface'),
                'default', '',
                'elementClass', 'Radio'
                );
        $this->setIfExists('gor_respondent_show',
                'default', '',
                'elementClass', 'Radio'
                );
        $this->setIfExists('gor_respondent_subscribe',
                'default', '',
                'elementClass', 'Radio'
                );
        $this->setIfExists('gor_respondent_unsubscribe',
                'default', '',
                'elementClass', 'Radio'
                );

        $this->setIfExists('gor_token_ask',
                'default', 'Gems\\Screens\\Token\\Ask\\ProjectDefaultAsk',
                'elementClass', 'Radio'
                );

        $this->setIfExists('gor_resp_change_event',
                'order', $this->getOrder('gor_user_class') + 1000
                );
        $this->setIfExists('gor_iso_lang',
                'order', $this->getOrder('gor_user_class') + 1010,
                'default', $this->project->getLocaleDefault()
                );
        if ($this->_styles) {
            $this->setIfExists('gor_style');
        }
        return $this;
    }
150169
public function applyEditSettings()
    {
        $this->applyDetailSettings();

        $this->set('gtf_id_field',          'elementClass', 'Hidden');
        $this->set('gtf_id_track',          'elementClass', 'Exhibitor');
        $this->set('gtf_field_type',        'elementClass', 'Exhibitor');

        $this->set('gtf_field_name',        'elementClass', 'Text',
                'size', '30',
                'minlength', 2,
                'required', true,
                'validator', $this->createUniqueValidator(array('gtf_field_name', 'gtf_id_track'))
                );

        $this->set('gtf_id_order',          'elementClass', 'Text',
                'validators[int]',    'Int',
                'validators[gt]',     new \Zend_Validate_GreaterThan(0),
                'validators[unique]', $this->createUniqueValidator(array('gtf_id_order', 'gtf_id_track'))
                );

        $this->set('gtf_field_code',        'elementClass', 'Text', 'minlength', 4);
        $this->set('gtf_field_description', 'elementClass', 'Text', 'size', 30);
        $this->set('gtf_field_values',      'elementClass', 'Hidden');
        $this->set('gtf_field_default',     'elementClass', 'Hidden');

        $this->set('gtf_to_track_info',     'elementClass', 'CheckBox',
                'onclick', 'this.form.submit();'
                );
        $this->set('gtf_track_info_label',  'elementClass', 'CheckBox',
                'required', false);
        $this->set('gtf_required',          'elementClass', 'CheckBox');
        $this->set('gtf_readonly',          'elementClass', 'CheckBox');

        $this->set('gtf_filter_id',         'elementClass', 'Hidden');
        $this->set('gtf_min_diff_length',   'elementClass', 'Hidden');
        $this->set('gtf_min_diff_unit',     'elementClass', 'Hidden');
        $this->set('gtf_max_diff_length',   'elementClass', 'Hidden');
        $this->set('gtf_max_diff_unit',     'elementClass', 'Hidden');
        $this->set('gtf_after_next',        'elementClass', 'None');  // Deprecatedin 1.7.1
        $this->set('gtf_uniqueness',        'elementClass', 'Hidden');

        $this->set('gtf_create_track',      'elementClass', 'Hidden');
        $this->set('gtf_create_wait_days',  'elementClass', 'Hidden');

        $class      = 'Model\\Dependency\\FieldTypeChangeableDependency';
        $dependency = $this->tracker->createTrackClass($class, $this->_modelField);
        $this->addDependency($dependency);
    }
1225072
protected function _initSettings()
    {
        try {

            $this->setAttributes($this->settings);
            $this->_oldAttributes = $this->toArray($this->safeAttributes());
        } catch (\Exception $e) {
            \Yii::error(\Yii::t('skeeks/cms', '{cms} component error load defaul settings',
                    ['cms' => 'Cms']).': '.$e->getMessage());
        }

        return $this;
    }
129750
public function getCMSFields()
    {
        $this->beforeUpdateCMSFields(function (FieldList $fields) {
            $fields
                ->fieldByName('Root.Main.HTML')
                ->setTitle(_t(__CLASS__ . '.ContentLabel', 'Content'));
        });
        return parent::getCMSFields();
    }
1072998
protected function prepareSetting(FieldTypeInterface $setting)
    {
        if (empty($setting->getTheme()) || is_array($setting->getTheme())) {
            // Page settings only have the "themosis" theme available.
            $setting->setTheme('themosis.pages');
        }

        $setting->setPrefix($this->getPrefix());
        $setting->setOptions([
            'label' => $setting->getOption('label', ucfirst($setting->getBaseName())),
            'placeholder' => $setting->getOption('placeholder', $setting->getBaseName())
        ]);

        $attributes = array_merge([
            'class' => 'regular-text'
        ], $setting->getAttributes());
        $setting->setAttributes($attributes);

        return $setting;
    }
74721
public function set_gliver_fr_controller_trait_properties()
	{
		//set the request_start_time
		$this->request_start_time = Registry::$gliver_app_start;

		//set the site title
		$this->site_title = Registry::getConfig()['title'];

		//return this object instance
		return $this;

	}
1304796
public function setPreferRead()
    {
        //====================================================================//
        // Safety Checks ==> Verify a new Field Exists
        if (empty($this->new)) {
            Splash::log()->err("ErrFieldsNoNew");
        } else {
            //====================================================================//
            // Update New Field structure
            $this->new->syncmode = self::MODE_READ;
        }

        return $this;
    }
766870
public function setPreferNone()
    {
        //====================================================================//
        // Safety Checks ==> Verify a new Field Exists
        if (empty($this->new)) {
            Splash::log()->err("ErrFieldsNoNew");
        } else {
            //====================================================================//
            // Update New Field structure
            $this->new->syncmode = self::MODE_NONE;
        }

        return $this;
    }