src/Widgets/TagsWidget.php
protected function getClassForOption($index)
    {
        // If true we need another offset.
        $intSub   = ($this->arrConfiguration['includeBlankOption'] ? -1 : 1);
        $strClass = $this->strName;

        if ($index == 0) {
            $strClass .= ' first';
        } elseif ($index === (count($this->options) - $intSub)) {
            $strClass .= ' last';
        }

        if (($index % 2) == 1) {
            $strClass .= ' even';
        } else {
            $strClass .= ' odd';
        }

        return ((strlen($this->strClass)) ? ' ' . $this->strClass : '') . $strClass;
    }
protected function getClassForOption($index)
    {
        // If true we need another offset.
        $intSub   = ($this->arrConfiguration['includeBlankOption'] ? -1 : 1);
        $strClass = $this->strName;

        if ($index == 0) {
            $strClass .= ' first';
        } elseif ($index === (count($this->options) - $intSub)) {
            $strClass .= ' last';
        }

        if (($index % 2) == 1) {
            $strClass .= ' even';
        } else {
            $strClass .= ' odd';
        }

        return ((strlen($this->strClass)) ? ' ' . $this->strClass : '') . $strClass;
    }
Get the css class for an option.

@param int $index The sequence number of the current option.

@return string