src/Slug.php
public function setSlugActive($active)
    {
        $validParameter = (
            $active === self::ACTIVE_NONE
            || $active === self::ACTIVE_SECTION
            || $active === self::ACTIVE_CURRENT
        );

        if (!$validParameter) {
            throw new InvalidArgumentException(
                "Passed an invalid value to setSlugActive. Please use the constants provided on" . self::class
            );
        }
        $this->active = $active;
        return $this->getOwner();
    }
public function setSlugActive($active)
    {
        $validParameter = (
            $active === self::ACTIVE_NONE
            || $active === self::ACTIVE_SECTION
            || $active === self::ACTIVE_CURRENT
        );

        if (!$validParameter) {
            throw new InvalidArgumentException(
                "Passed an invalid value to setSlugActive. Please use the constants provided on" . self::class
            );
        }
        $this->active = $active;
        return $this->getOwner();
    }
Set whether this slugged item is being viewed
{@see self::ACTIVE_NONE}
{@see self::ACTIVE_SECTION}
{@see self::ACTIVE_CURRENT}

@param null|boolean $active
@return DataObject
@throws InvalidArgumentException