static public function isValidSelectionMode($mode, $throw = false)
    {
        $valid = in_array($mode, [
            static::SELECTION_SINGLE,
            static::SELECTION_MULTIPLE,
        ], true);

        if (!$valid && $throw) {
            throw new Exception\InvalidArgumentException("Invalid selection mode '{$mode}'.");
        }

        return $valid;
    }