Set enable/disable status

@param bool $enable
@return Schedule
510922
public function setEnabled($enabled) {

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

        $this->enabled = $ena;

        return $this;

    }
1021129
public function setActive( $active = null ) {
		$this->active = (bool)$active;
		$this->toggleClasses( [ 'oo-ui-buttonElement-active' ], $this->active );
		return $this;
	}
213996
public function setDisabled( $disabled ) {
		$this->disabled = (bool)$disabled;
		$this->toggleClasses( [ 'oo-ui-widget-disabled' ], $this->disabled );
		$this->toggleClasses( [ 'oo-ui-widget-enabled' ], !$this->disabled );
		$this->setAttributes( [ 'aria-disabled' => $this->disabled ? 'true' : 'false' ] );

		return $this;
	}
1242580
public function setStatus($status)
    {
        $status = $status ? self::STATUS_ENABLED : self::STATUS_DISABLED;

        $this->setData('status', $status);
        return $this;
    }
782121
public function localeEnabled(bool $enabled = true): SectionTwigExtension
    {
        $this->options[ReadOptions::LOCALE_ENABLED] = $enabled;

        return $this;
    }
1138472
protected function _enable($exts)
    {
        if (!empty($exts) && $this->_capability('ENABLE')) {
            $c = $this->_capability();
            $todo = array();

            // Only enable non-enabled extensions.
            foreach ($exts as $val) {
                if (!$c->isEnabled($val)) {
                    $c->enable($val);
                    $todo[] = $val;
                }
            }

            if (!empty($todo)) {
                $cmd = $this->_command('ENABLE')->add($todo);
                $cmd->on_error = function() use ($todo, $c) {
                    /* Something went wrong... disable the extensions. */
                    foreach ($todo as $val) {
                        $c->enable($val, false);
                    }
                };
                $this->_cmdQueue[] = $cmd;
            }
        }
    }
556935
public function enable($capability, $enable = true)
    {
        $capability = Horde_String::upper($capability);
        $enabled = $this->isEnabled($capability);

        if ($enable && !$enabled) {
            switch ($capability) {
            case 'QRESYNC':
                /* RFC 7162 [3.2.3] - Enabling QRESYNC also implies enabling
                 * of CONDSTORE. */
                $this->enable('CONDSTORE');
                break;
            }

            $this->_enabled[] = $capability;
            $this->notify();
        } elseif (!$enable && $enabled) {
            $this->_enabled = array_diff($this->_enabled, array($capability));
            $this->notify();
        }
    }
478732
public function enabled($enabled = true)
    {
        if (is_bool($enabled)) {
            return $this->andWhere(['enabled' => $enabled == true ? 1 : 0]);
        }
        return $this;
    }
624687
public function disableEditingCheck(bool $disable = true)
    {
        $this->builder()->getFooter()->disableEditingCheck($disable);

        return $this;
    }
121528
public function setEnabled(Enabled $enabled)
    {
        $randomMode = false === $enabled->value() ? new PhpUnitRandomMode(false) : $this->randomMode;
        $options = false === $enabled->value() ? new PhpUnitOptions(null) : $this->options;
        
        return new self(
            new Undefined(false),
            $enabled,
            $randomMode,
            $options
        );
    }
261705
public function setStrictVariables(bool $isEnabled = true): self
    {
        if ($isEnabled) {
            $this->twigEnvironment->enableStrictVariables();
        } else {
            $this->twigEnvironment->disableStrictVariables();
        }

        return $this;
    }
171540
public function disableBatchActions(bool $disable = true)
    {
        $this->tools = $this->tools->map(function ($tool) use ($disable) {
            if ($tool instanceof BatchActions) {
                return $tool->disable($disable);
            }

            return $tool;
        });
    }
176626
public function allowBban($allow = null)
    {
        if (null !== $allow) {
            $this->allowBban = (bool) $allow;

            return $this;
        }

        return $this->allowBban;
    }
917875
public function enableTime(bool $time = true) : self
    {
        $this->set('data-fields--datetime-enable-time', var_export($time, true));

        return $this;
    }
900783
public function set_status($status = self::STATUS_ACTIVE) {
        $this->statusactive = $status == static::STATUS_ACTIVE;
        $this->statussuspended = $status == static::STATUS_SUSPENDED;
        $this->statusnotcurrent = $status == static::STATUS_NOT_CURRENT;

        return $this;
    }
1242876
public function set_threading($enable = false)
    {
        $this->threading = false;

        if ($enable && ($caps = $this->get_capability('THREAD'))) {
            $methods = array('REFS', 'REFERENCES', 'ORDEREDSUBJECT');
            $methods = array_intersect($methods, $caps);

            $this->threading = array_shift($methods);
        }

        return $this->threading;
    }
131287
public function disableSubmit(bool $disable = true)
    {
        $this->builder()->getFooter()->disableSubmit($disable);

        return $this;
    }