The HTML for the Bootstrap Multiselect jQuery plugin
https://github.com/davidstutz/bootstrap-multiselect
params on line 393, bootstrap-multiselect/dist/js/bootstrap-multiselect.js

@param  int       $count        The number of categories
@return string
197331
private static function renderBootstrapMultiselectPlugin($count) {

        $html = '<script type="text/javascript">';
        $html .= '$(document).ready(function() {';
        $html .= "$('#parent_id').multiselect(";
        $html .= "{";

        $html .= "nonSelectedText: 'Select a category',";
        $html .= 'enableHTML: false,';
        $html .= "maxHeight: 200,";

        if ($count > 10) {
            $html .= "enableFiltering: true,";
            $html .= "enableCaseInsensitiveFiltering: false,";
            $html .= "enableFullValueFiltering: false,";
            $html .= "filterBehavior: 'text',";
            $html .= "filterPlaceholder: 'Search...',";
        }

        $html .= "buttonClass: 'btn btn-default'";

        $html .= "}";
        $html .= ");";
        $html .= '});';
        $html .= '</script>';

        return $html;
}
958060
protected function getListModule($count = false)
    {
        $list = $this->module->getList();

        $this->checkDependenciesListModule($list);
        $this->prepareListModule($list);

        $allowed = $this->getAllowedFiltersModule();
        $this->filterList($list, $allowed, $this->query_filter);
        $this->sortList($list, $allowed, $this->query_filter, array('id' => 'asc'));

        if ($count) {
            return count($list);
        }

        $this->limitList($list, $this->data_limit);
        return $list;
    }
192913
public function getHtml(): string
  {
    $this->prepareOverviewTable();

    if (!empty($this->templateData))
    {
      $this->setAttrData('slat-name', $this->submitName);

      // If required add template row to this louver control. This row will be used by JS for adding dynamically
      // additional rows to the louver control.
      $this->templateData[$this->templateKey] = 0;
      $row                                    = $this->rowFactory->createRow($this, $this->templateData);
      $row->addClass('slat_template');
      $row->setAttrStyle('visibility: collapse');
      $row->prepare($this->submitName);
    }

    $ret = $this->prefix;

    $ret .= Html::generateTag('table', $this->attributes);

    // Generate HTML code for the column classes.
    $ret .= '<colgroup>';
    $ret .= $this->rowFactory->getHtmlColumnGroup();
    $ret .= '</colgroup>';

    $ret .= Html::generateTag('thead', ['class' => OverviewTable::$class]);
    $ret .= $this->getHtmlHeader();
    $ret .= '</thead>';

    if ($this->footerControl)
    {
      $ret .= Html::generateTag('tfoot', ['class' => OverviewTable::$class]);
      $ret .= '<tr>';
      $ret .= Html::generateTag('td', ['colspan' => $this->rowFactory->getNumberOfColumns()]);
      $ret .= $this->footerControl->getHtml();
      $ret .= '</td>';
      $ret .= '<td class="error"></td>';
      $ret .= '</tr>';
      $ret .= '</tfoot>';
    }

    $ret .= Html::generateTag('tbody', ['class' => OverviewTable::$class]);
    $ret .= $this->getHtmlBody();
    $ret .= '</tbody>';

    $ret .= '</table>';

    $ret .= $this->postfix;

    $this->rowFactory->generateResponsiveCss($this->getAttribute('id'));

    return $ret;
  }
530374
protected function doRead(int $offset, int $count): string
    {
        /** @var string|false $data */
        $data = substr($this->content, $offset, $count);
        return (false === $data) ? '' : $data;
    }
569818
public function read(int $count): string
    {
        $this->lastAccessed = time();
        return $this->content->read($count);
    }
1272088
public static function getValues($count)
    {
        if (!Int::is($count) || $count < 1) {
            throw new \InvalidArgumentException("The \$count parameter must be of type int and greater than zero.");
        }

        $ret = [];
        $flag = 1;
        for ($i = 0; $i < $count; $i++) {
            $ret[] = $flag;
            $flag <<= 1;
        }

        return $ret;
    }
247460
protected function getSelect()
    {
        $html = '<select>';

        if (is_array($this->window['all'])) {
            $html .= $this->getOptionLinks($this->window['all']);
        }

        $html .= '</select>';

        return $html;
    }
1248635
public function bootstrap4(): string
    {
        if (!empty($this->submenus)) {
            $submenus = '';
            foreach ($this->submenus as $submenu) {
                $attrs = '';
                foreach ($submenu->attrs as $key => $value) {
                    $attrs .= ' ' . $key . '="' . e($value) . '"';
                }

                $class = trim('dropdown-item ' . $submenu->class);
                $submenus .= '<a class="' . $class . '" href="' . e($submenu->link) . '"' . $attrs . '>' . $submenu->label . '</a>';
            }

            $class = trim('nav-item dropdown ' . $this->class);

            return
                '<li class="' . $class . '">' .
                '<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">' .
                $this->label .
                '<span class="caret"></span></a>' .
                '<div class="dropdown-menu" role="menu">' .
                $submenus .
                '</div>' .
                '</li>';
        }

        $attrs = '';
        foreach ($this->attrs as $key => $value) {
            $attrs .= ' ' . $key . '="' . e($value) . '"';
        }

        $class = trim('nav-item ' . $this->class);

        return '<li class="' . $class . '"><a class="nav-link" href="' . e($this->link) . '"' . $attrs . '>' . $this->label . '</a></li>';
    }
1315227
public function count($count = false): int
    {
        // 如果不传递参数,返回记录总数
        if ($count === false) {
            return $this->count;
        }

        // 记录总数
        $this->count = intval($count);

        // 计算总页数
        $this->allPage = ceil($count / $this->size);

        // 调整当前页数,不能大于总页数
        $this->page = max(1, min($this->page, $this->allPage));

        return $this->count;
    }
765820
public function listJobResults($type, $count = null, array $options = [])
    {
        $urlQuery = null;

        /** @var AbstractHttpRequest $request */
        $request          = $this->getRequest();
        $request->options = $options;
        $request->path    = $this->client->fullDatabasePath . static::API_PATH . '/' . $type;
        $urlQueryStr      = '';

        if ($count) {
            $urlQuery    = ['count' => $count];
            $urlQueryStr = $request->buildUrlQuery($urlQuery);
        }

        $request->path .= $urlQueryStr;

        $request->method = static::METHOD_GET;

        return $this->getReturnObject($request);
    }
424147
private function getStatementContentAll($count = false)
    {
        $q = $this->connection->createQueryBuilder()
            ->select($count ? 'count(c.id)' : 'c.id')
            ->from('ezcontentobject', 'c')
            ->where('c.status = :status')
            ->setParameter('status', ContentInfo::STATUS_PUBLISHED, PDO::PARAM_INT);

        return $q->execute();
    }
698593
public function withFeatured(int $count = 1)
    {
        if (!$items = $this->get('items')) {
            $this->append('featured', []);

            return $this;
        }

        $featured = $items->shift();

        $this->content['items'] = $items;
        $this->append('featured', [$featured]);

        return $this;
    }
109497
private function generateCustomers($count)
    {
        $customers = [];

        for ($i = 0; $i < $count; ++$i) {
            /** @var CustomerInterface $customer */
            $customer = $this->customerFactory->createNew();
            $customer->setEmail(sprintf('john%s@doe.com', uniqid()));
            $customer->setFirstname('John');
            $customer->setLastname('Doe' . $i);

            $customers[] = $customer;

            $this->customerRepository->add($customer);
        }

        return $customers;
    }
368442
public function getGroupList($begin = 0, $count = 10)
    {
        $url = "https://api.weixin.qq.com/shakearound/device/group/getlist?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, ['begin' => $begin, 'count' => $count]);
    }
6615
private function formatCommaSeparated($collection, $count)
    {
        $display = \array_map(function ($element) {
            return (string) $element;
        }, \array_slice($collection, 0, $count - 1));

        return $this->translator->trans('comma_separated', [
            '%list%' => \implode(', ', $display),
            '%last%' => (string) \end($collection),
        ], $this->catalogue);
    }
383562
public function gettext_select_plural_form($count)
    {
        if (!isset($this->_gettext_select_plural_form)
            || is_null($this->_gettext_select_plural_form)) {
            list($nplurals, $expression) = $this->nplurals_and_expression_from_header($this->get_header('Plural-Forms'));
            $this->_nplurals = $nplurals;
            $this->_gettext_select_plural_form = $this->make_plural_form_function($nplurals, $expression);
        }

        return call_user_func($this->_gettext_select_plural_form, $count);
    }
154777
private function get_display_mode_selector_html(int $displaymode) : string {
        $baseurl = $this->baseurl;
        $select = new single_select(
            $baseurl,
            'mode',
            forum_get_layout_modes(),
            $displaymode,
            null,
            'mode'
        );
        $select->set_label(get_string('displaymode', 'forum'), ['class' => 'accesshide']);

        return $this->renderer->render($select);
    }