Sets the common default attributes of the elements

@return $this The current instance for a fluent interface.
5063
protected function setDefaults()
    {
        $this->setBankLeftAttr(3, 8, 50, 4);
        $this->setBankRightAttr(66, 8, 50, 4);
        $this->setRecipientLeftAttr(3, 23, 50, 4);
        $this->setRecipientRightAttr(66, 23, 50, 4);
        $this->setAccountLeftAttr(27, 43, 30, 4);
        $this->setAccountRightAttr(90, 43, 30, 4);
        $this->setAmountFrancsLeftAttr(5, 50.5, 35, 4);
        $this->setAmountFrancsRightAttr(66, 50.5, 35, 4);
        $this->setAmountCentsLeftAttr(50, 50.5, 6, 4);
        $this->setAmountCentsRightAttr(111, 50.5, 6, 4);
        $this->setPayerLeftAttr(3, 65, 50, 4);
        $this->setPayerRightAttr(125, 48, 50, 4);

        return $this;
    }
1171871
protected function setDefaults()
	{
		$this->file = $this->protect(function($filePath)
		{
			return new SplFileInfo($filePath);
		});
		
		$this->tempFile = $this->protect(function($contents, $ext)
		{
			$file = new TempFile('GearsPdf', $ext);
			
			$file->setContents($contents);
			
			return $file;
		});
	}
38210
protected function setDefaults()
    {
        parent::setDefaults();

        $this->setReferenceNumberLeftAttr(3, 60, 50, 4, null, null, 8);
        $this->setReferenceNumberRightAttr(125, 33.5, 80, 4);
        $this->setCodeLineAttr(64, 85, 140, 4, null, 'OCRB10');

        $this->setSlipBackground(__DIR__.'/Resources/img/ezs_orange.gif');

        return $this;
    }
585951
protected function setDefaults()
	{
		$this->zip = function()
		{
			return new ZipArchive;
		};

		$this->xml = $this->protect(function($xml)
		{
			return SimpleXMLElement::fixSplitTags($xml);
		});

		$this->converter = function()
		{
			return new LibreOffice();
		};
	}
676730
protected function makeDefaultComponents()
    {
        $components = parent::makeDefaultComponents();
        unset($components[ManagedList::RECORD_VIEW_ID]);
        $components[ManagedList::CONTROL_CONTAINER_ID]->setDestinationParentId(static::CONTROL_ROW_ID);
        $components[ManagedList::LIST_CONTAINER_ID]->setDestinationParentId(static::TABLE_BODY_ID);
        $components[ManagedList::SUBMIT_BUTTON_ID]->setDestinationParentId(static::CONTROL_ROW_ID);
        return array_merge(
            $components,
            [
                static::TABLE_ID => new Part(
                    new Tag('table'),
                    static::TABLE_ID,
                    static::FORM_ID
                ),
                static::TABLE_HEADING_ID => new Part(
                    new Tag('thead'),
                    static::TABLE_HEADING_ID,
                    static::TABLE_ID
                ),
                static::TITLE_ROW_ID => new Part(
                    new Tag('tr'),
                    static::TITLE_ROW_ID,
                    static::TABLE_HEADING_ID
                ),
                static::CONTROL_ROW_ID => new Part(
                    new SolidRow(),
                    static::CONTROL_ROW_ID,
                    static::TABLE_HEADING_ID
                ),
                static::TABLE_BODY_ID => new Part(new Tag('tbody'), static::TABLE_BODY_ID, static::TABLE_ID),
                static::RECORD_VIEW_ID => new RecordView(new Tag('tr')),
                static::TABLE_FOOTER_ID => new Part(new Tag('tfoot'), static::TABLE_FOOTER_ID, static::TABLE_ID),
            ]
        );
    }
1072794
public function resetAttributes(){
        $this->attributes = array();
        foreach($this->getUsedAttributes() as $attributeClass){
            if(class_exists($attributeClass) && is_subclass_of($attributeClass, 'oat\\taoQtiItem\\model\\qti\\attribute\\Attribute')){
                $attribute = new $attributeClass();
                $this->attributes[$attribute->getName()] = $attribute;
            }else{
                common_Logger::w('attr does not exists '.$attributeClass);
            }
        }
    }
426590
protected function _setDefaults()
    {
        $this->setConfigParam('sTheme', 'azure');

        if (is_null($this->getConfigParam('sDefaultLang'))) {
            $this->setConfigParam('sDefaultLang', 0);
        }

        if (is_null($this->getConfigParam('blLogChangesInAdmin'))) {
            $this->setConfigParam('blLogChangesInAdmin', false);
        }

        if (is_null($this->getConfigParam('blCheckTemplates'))) {
            $this->setConfigParam('blCheckTemplates', false);
        }

        if (is_null($this->getConfigParam('blAllowArticlesubclass'))) {
            $this->setConfigParam('blAllowArticlesubclass', false);
        }

        if (is_null($this->getConfigParam('iAdminListSize'))) {
            $this->setConfigParam('iAdminListSize', 9);
        }

        // #1173M  for EE - not all pic are deleted
        if (is_null($this->getConfigParam('iPicCount'))) {
            $this->setConfigParam('iPicCount', 12);
        }

        if (is_null($this->getConfigParam('iZoomPicCount'))) {
            $this->setConfigParam('iZoomPicCount', 4);
        }

        if (is_null($this->getConfigParam('iDebug'))) {
            $this->setConfigParam('iDebug', $this->isProductiveMode() ? 0 : -1);
        }

        $this->setConfigParam('sCoreDir', __DIR__ . DIRECTORY_SEPARATOR);
    }
1166766
protected function setDefault()
    {
        if (strpos($this->input, '=')) {
            list($this->input, $this->default) = explode('=', $this->input);

            $this->modeArray[] = 'OPTIONAL';
        }

        return $this;
    }
829670
protected function _setDefaults()
    {
        $defaults = [
            'authenticate' => [
                'Form' => [
                    'finder'    => 'auth',
                    'userModel' => 'Community.Users',
                    'fields'    => [
                        'username' => 'login',
                        'password' => 'password'
                    ],
                ]
            ],
            'flash' => [
                'key'       => 'auth',
                'element'   => 'error',
                'params'    => ['class' => 'error']
            ],
            'loginAction' => [
                'controller' => 'Users',
                'action'     => 'login',
                'plugin'     => 'Community'
            ],
            'unauthorizedRedirect' => [
                'action'     => 'login',
                'controller' => 'Users',
                'plugin'     => 'Community'
            ],
            'authorize'      => ['Community.Base'],
            'loginRedirect'  => $this->_getLoginRedirect(),
            'logoutRedirect' => $this->_config['loginAction'],
            'authError'      => __d('community', 'You are not authorized to access that location.')
        ];

        $config = $this->getConfig();
        foreach ($config as $key => $value) {
            if ($value !== null) {
                unset($defaults[$key]);
            }
        }

        $this->setConfig($defaults);
    }
71861
protected function setDefaults()
    {
        if (!isset($this->contentOptions['category']) 
                || (isset($this->contentOptions['category']) 
                        && empty($this->contentOptions['category']))) {
            $this->contentOptions['category'] = 'app';
        }
        if (!isset($this->contentOptions['mainParams'])) {
            $this->contentOptions['mainParams'] = [];
        }
        if (!isset($this->contentOptions['buttonParams'])) {
            $this->contentOptions['buttonParams'] = [];
        }
        if (!isset($this->contentOptions['language'])) {
            $this->contentOptions['language'] = null;
        }
        if (!isset($this->contentOptions['mainMessage'])) {
            $this->contentOptions['mainMessage'] = 'We use cookies on our websites to help us offer you the best online experience. By continuing to use our website, you are agreeing to our use of cookies. Alternatively, you can manage them in your browser settings.';
        }
        if (!isset($this->contentOptions['buttonMessage'])) {
            $this->contentOptions['buttonMessage'] = 'I understand';
        }
        if (!isset($this->cookieOptions['path'])) {
            $this->cookieOptions['path'] = '/';
        }
        if (!isset($this->cookieOptions['expires'])) {
            $this->cookieOptions['expires'] = 30;
        }
        if (!isset($this->cookieOptions['secure'])) {
            $this->cookieOptions['secure'] = false;
        }
        if (!isset($this->classOptions['classOuter'])) {
            $this->classOptions['classOuter'] = 'CookieMonsterBox';
        }
        if (!isset($this->classOptions['classInner'])) {
            $this->classOptions['classInner'] = '';
        }
        if (!isset($this->classOptions['classButton'])) {
            $this->classOptions['classButton'] = 'CookieMonsterOk';
        }
    }
1076249
protected function initAttributes()
    {
        foreach ($this->attributeCollection as $attribute) {
            $this->attributes[$attribute->getAttributeCode()] = [
                'id' => $attribute->getId(),
                'is_required' => $attribute->getIsRequired(),
                'is_static' => $attribute->isStatic(),
                'rules' => $attribute->getValidateRules() ? unserialize($attribute->getValidateRules()) : null,
                'type' => Import::getAttributeType($attribute),
                'options' => $this->getAttributeOptions($attribute),
                'attribute' => $attribute
            ];
        }

        return $this;
    }
188979
public function attachDefaultListeners()
    {
        parent::attachDefaultListeners();

        $serviceLocator  = $this->serviceLocator;
        $defaultServices = $serviceLocator->get('DefaultListeners');
        $events          = $this->getEventManager();
        $events->attach($defaultServices);

        return $this;
    }
650476
public function setDefaultValues(Array $defaultValues)
    {
        foreach ($defaultValues as $defaultName => $defaultValue) {
            if (array_key_exists($defaultName, $this->_metadata)) {
                $this->_defaultValues[$defaultName] = $defaultValue;
            }
        }
        return $this;
    }
247514
public function push()
    {
        $args = func_get_args();

        if (!empty($args)) {
            foreach ($args as  $arg) {
                array_push($this->attributes, $arg);
            }
        }

        return $this;
    }
1319978
public function set_defaults() {
		// General attributes.
		$this->set_tags_to_ignore();
		$this->set_classes_to_ignore();
		$this->set_ids_to_ignore();

		// Smart characters.
		$this->set_smart_quotes();
		$this->set_smart_quotes_primary();
		$this->set_smart_quotes_secondary();
		$this->set_smart_quotes_exceptions();
		$this->set_smart_dashes();
		$this->set_smart_dashes_style();
		$this->set_smart_ellipses();
		$this->set_smart_diacritics();
		$this->set_diacritic_language();
		$this->set_diacritic_custom_replacements();
		$this->set_smart_marks();
		$this->set_smart_ordinal_suffix();
		$this->set_smart_ordinal_suffix_match_roman_numerals();
		$this->set_smart_math();
		$this->set_smart_fractions();
		$this->set_smart_exponents();

		// Smart spacing.
		$this->set_single_character_word_spacing();
		$this->set_fraction_spacing();
		$this->set_unit_spacing();
		$this->set_french_punctuation_spacing();
		$this->set_units();
		$this->set_dash_spacing();
		$this->set_dewidow();
		$this->set_max_dewidow_length();
		$this->set_max_dewidow_pull();
		$this->set_dewidow_word_number();
		$this->set_wrap_hard_hyphens();
		$this->set_url_wrap();
		$this->set_email_wrap();
		$this->set_min_after_url_wrap();
		$this->set_space_collapse();
		$this->set_true_no_break_narrow_space();

		// Character styling.
		$this->set_style_ampersands();
		$this->set_style_caps();
		$this->set_style_initial_quotes();
		$this->set_style_numbers();
		$this->set_style_hanging_punctuation();
		$this->set_initial_quote_tags();

		// Hyphenation.
		$this->set_hyphenation();
		$this->set_hyphenation_language();
		$this->set_min_length_hyphenation();
		$this->set_min_before_hyphenation();
		$this->set_min_after_hyphenation();
		$this->set_hyphenate_headings();
		$this->set_hyphenate_all_caps();
		$this->set_hyphenate_title_case();
		$this->set_hyphenate_compounds();
		$this->set_hyphenation_exceptions();

		// Parser error handling.
		$this->set_ignore_parser_errors();
	}
900221
public static function setDefault()
    {
        if(!self::$default) {
            $languages = Language::all();
            if($languages) {
                $getDefault = $languages->where('isDefault', true);

                if ($getDefault) {
                    self::$default = $getDefault->first();
                    self::$current = self::$default; //current language is the same as default one in this phase

                    App::setLocale(self::$default->slug);
                    Carbon::setLocale(self::$default->slug);
                    return;
                }
            }

            throw new \Exception("Default language could not be found. Please check if a default language is defined in Administration");
        }
        return;
    }
853888
protected function setDefaultDataTypes()
    {
        foreach ($this->_params as $key => $value) {
            switch (gettype($value)) {
                case "boolean":
                    $this->_types[$key] = 'boolean';
                    break;
                case "integer":
                    $this->_types[$key] = 'integer';
                    break;
                case "double":
                    $this->_types[$key] = 'float';
                    break;
                case "string":
                    $this->_types[$key] = 'string';
                    break;
                case "array":
                    $this->_types[$key] = 'array';
                    break;
                default:
                    $this->_types[$key] = null;
                    break;
            }
        }
    }