static public function validateType($type, $throwException = true)
    {
        if (in_array($type, [
            self::TYPE_DEFAULT,
            self::TYPE_INFO,
            self::TYPE_PRIMARY,
            self::TYPE_SUCCESS,
            self::TYPE_WARNING,
            self::TYPE_DANGER,
        ])) {
            return true;
        }

        if ($throwException) {
            throw new \InvalidArgumentException(sprintf('Invalid modal type "%s".', $type));
        }

        return false;
    }
static public function validateType($type, $throwException = true)
    {
        if (in_array($type, [
            self::TYPE_DEFAULT,
            self::TYPE_INFO,
            self::TYPE_PRIMARY,
            self::TYPE_SUCCESS,
            self::TYPE_WARNING,
            self::TYPE_DANGER,
        ])) {
            return true;
        }

        if ($throwException) {
            throw new \InvalidArgumentException(sprintf('Invalid modal type "%s".', $type));
        }

        return false;
    }
static public function validateType ( $ type , $ throwException = true ) { if ( in_array ( $ type , [ self :: TYPE_DEFAULT , self :: TYPE_INFO , self :: TYPE_PRIMARY , self :: TYPE_SUCCESS , self :: TYPE_WARNING , self :: TYPE_DANGER , ] ) ) { return true ; } if ( $ throwException ) { throw new \ InvalidArgumentException ( sprintf ( 'Invalid modal type "%s".' , $ type ) ) ; } return false ; }
Validates the modal type.

@param string $type
@param bool $throwException
@return bool
@throws \InvalidArgumentException
Validates the modal type .