Checks for the active scope.

@param bool $update
@return $this
192781
protected function checkScope($update = true)
    {
        $request = request();

        if ($update && $request->exists('scope')) {

            $this->activeScope = $request->get('scope');

            $this->markResetActivePage();
            $this->storeActiveScopeInSession();
        } else {
            $this->retrieveActiveScopeFromSession();
        }

        // Check if active is valid, reset it othwerwise
        if ($this->activeScope && ! $this->isValidScopeKey($this->activeScope)) {
            $this->activeScope = null;
            $this->storeActiveScopeInSession();
        }

        return $this;
    }
691185
public function setBoolean($boolean = null)
    {
        $this->boolean = null !== $boolean ? (bool) $boolean : null;

        return $this;
    }
511007
public function setActive($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->active !== $v) {
            $this->active = $v;
            $this->modifiedColumns[SmartyFilterTableMap::ACTIVE] = true;
        }


        return $this;
    }
1135964
public function update(Queries\IScope $scope)
    {
        if ($this->scope === $scope) {
            return $this;
        }

        return new self($scope);
    }
522747
final public function isActive($active = null)
    {
        if (isset($active)) {
            $this->active = (bool) $active;
            return $this;
        }
        else {
            return $this->active;
        }
    }
487327
public function update($updateNulls = false)
    {
        // Event
        $this->triggerEvent(
            'onBefore' . ucfirst(__FUNCTION__),
            [
                'updateNulls' => &$updateNulls,
            ]
        );

        $this->triggerEvent(
            'onBeforeStore',
            [
                'updateNulls' => &$updateNulls,
            ]
        );

        // Do Action
        $this->getDataMapper()->updateOne($this, $this->getKeyName(true), $updateNulls);

        // Event
        $this->triggerEvent(
            'onAfterStore',
            [
                'updateNulls' => &$updateNulls,
            ]
        );

        $this->triggerEvent('onAfter' . ucfirst(__FUNCTION__));

        return $this;
    }
454469
function setScope($scope)
    {
        $scopes = array_merge($this->getScopes(), array( (string) $scope) );
        $this->setScopes($scopes);
        return $this;
    }
580155
public function setScope($scope)
    {
        $validScopes = ['col', 'row', 'colgroup', 'rowgroup'];

        if (!StringHelper::isOneOf($scope, $validScopes)) {
            throw new \Exception(sprintf('"%s" is not a valid <td> scope. Valid are: %s', $scope, implode(', ', $validScopes)));
        }

        $this->attributes->set('scope', $scope);

        return $this;
    }
1212334
protected function update_object() {
		// If the "prev_create" filter returns false we'll bail out of the update and return
		// false, indicating that the save failed. This provides a chance for any
		// hooks to cancel update operations if validations fail or whatever.
		if ( false === apply_filters( $this->prefix( 'prev_create' ), true ) ) {
			return false;
		}

		/**
		 * Fires updating action.
		 *
		 * @param static $wp_object Current object instance.
		 */
		do_action( $this->prefix( 'updating' ), $this );

		$dirty = $this->get_dirty();

		if ( count( $dirty ) > 0 ) {
			$updated = $this->perform_update( $dirty );

			if ( false === $updated ) {
				return false;
			}

			/**
			 * Fires updated action.
			 *
			 * @param static $wp_object Current object instance.
			 */
			do_action( $this->prefix( 'updated' ), $this );

			$this->sync_changes();
		}

		return true;
	}
1333181
public function setStyle(array $style = [], $update = true)
    {
        $this->style = $update
            ? array_merge($this->style, $style)
            : $style;

        return $this;
    }
403125
public function scope(...$scopes): self
    {
        $this->scopes = \array_merge($this->scopes, $scopes);

        return $this;
    }
1085285
public function setActiveOnly($flag = true)
    {
        $flag = (bool)$flag;
        if ($this->activeOnly !== $flag) {
            $this->clear();
            $this->activeOnly = $flag;
        }
        return $this;
    }
624687
public function disableEditingCheck(bool $disable = true)
    {
        $this->builder()->getFooter()->disableEditingCheck($disable);

        return $this;
    }
300718
public function setChecked(bool $checked) : self
    {
        if ($checked) {
            $this->getField()->addProp('checked');
        } else {
            $this->getField()->removeProp('checked');
        }

        return $this;
    }
902348
public function read($read = false)
    {
        $this->read = true;

        if ($read === false) {
            $this->read = false;
        }

        return $this;
    }
368588
public function push($scope)
    {
        if (! is_array($scope)) {
            $scope = func_get_args();
        }

        $this->scopes[] = $scope;

        return $this;
    }
1075975
protected function applyScope()
    {
        foreach ($this->scopeQuery as $callback) {
            if (is_callable($callback)) {
                $this->query = $callback($this->query);
            }
        }

        // Clear scopes
        $this->scopeQuery = [];

        return $this;
    }