Activate focus on elements with the attribute "autofocus"
@staticvar boolean $activated
@return $this
554293
public function enableAutofocus()
    {
        static $enabled = false;
        
        if (!$enabled) {
            $script = "$(document).ready(function(){"
                    . "\$(this).find('[autofocus]:first').focus();"
                    . "});";
            $this->registerScript($script);
            $enabled = true;
        }
        
        return $this;
    }
55467
public function applyEditSettings($create = false)
    {
        $this->applyDetailSettings();

        // gcon_id is not needed for some validators
        $this->set('gcon_id',            'elementClass', 'Hidden');

        $this->set('gcon_active',        'elementClass', 'Checkbox');

        return $this;
    }
841372
public function setInactive() {
		if ($this->_active) {
			$this->removeClass(self::CLASS_ACTIVE);
			$this->_active = false;
		}
		
		return $this;
	}
701857
public function withAutoplay(bool $autoPlay): self
    {
        if ($this->autoPlay == $autoPlay) {
            return $this;
        }

        $url = clone $this;
        $url->autoPlay = $autoPlay;

        return $url;
    }
1176682
public function deactivate()
    {
        $this->activated_at = null;
        $this->active = false;

        EventManager::instance()->dispatch(new Event('Wasabi.User.deactivated', $this));

        return $this;
    }
1236169
public function setActive($active)
    {
        if (is_callable($active) || is_string($active)) {
            $condition = $active;
        } else {
            $condition = null;
        }

        $this->activeCondition = $condition;

        return parent::setActive($active);
    }
665240
public function activate($index){
		$this->content["menu"]->getItem($index)->setActive(true);
		$this->content[$index]->setActive(true);
		return $this;
	}
1084938
public function isActive($active = true)
    {
        if (! is_bool($active)) {
            $active = false;
        }
        $this->isActive = $active;

        return $this;
    }
1088789
public function setActive($isActive)
    {
        $this->isActive = (bool) $isActive;
        
        if ($this->parent !== null) {
            $this->parent->setActive($isActive);
        }
    }
510922
public function setEnabled($enabled) {

        $ena = DataFilter::filterBoolean($enabled);

        $this->enabled = $ena;

        return $this;

    }
190593
function focusBinding (event) {
        this._hasFocus = true;
        var cb;
        if (this._hasPlaceholder) {
            cb = this._setCaretForPlaceholder;
        } else if (this._cfg.autoselect) {
            cb = this._autoselect;
        }

        if (cb) {
            ariaCoreTimer.addCallback({
                fn : cb,
                scope : this,
                delay : 4
            });
        }

    }
879812
public function enableAutoSubmitting()
    {
        if ($this->autoSubmitting === false) {
            $this->autoSubmitting = true;
            $this->onAutoSubmittingValueChange();
        }
        return $this;
    }
1002204
function(setFocus) {
		var node = this.activeNode;
		if( node ) {
			this.activeNode = null; // Force re-activating
			node.setActive();
			if( setFocus ){
				node.setFocus();
			}
		}
	}
764976
function() {
			var self = this;
			if (self.settings.mode === 'single') return;
	
			self.$activeItems = Array.prototype.slice.apply(self.$control.children(':not(input)').addClass('active'));
			if (self.$activeItems.length) {
				self.hideInput();
				self.close();
			}
			self.focus();
		}
94872
public function setSelectors($selectors)
    {
        $this->selectors = [];
        if (!is_array($selectors)) {
            $selectors = [$selectors];
        }
        foreach ($selectors as $selector) {
            $this->addSelector($selector);
        }

        return $this;
    }
1049554
public function activateJQuery()
    {
        if ($this->_no_jquery) {
            parent::activateJQuery();

            $this->addPrefixPath('Gems_JQuery_Form_Decorator', 'Gems/JQuery/Form/Decorator/', \Zend_Form::DECORATOR);
            $this->addPrefixPath('Gems_JQuery_Form_Element', 'Gems/JQuery/Form/Element/', \Zend_Form::ELEMENT);
        }

        return $this;
    }
941578
public function setChecked(bool $checked = true) : FormElement
    {
        if (true === $checked) {
            $this->attributes['checked'] = 'checked';
        } else {
            unset($this->attributes['checked']);
        }
        return $this;
    }