Msieprawski\ResourceTable\Helpers\Column::_getSortAnchor PHP Method

_getSortAnchor() private method

Returns column sort anchor (result depends on view name)
private _getSortAnchor ( ) : string
return string
    private function _getSortAnchor()
    {
        $result = '';
        /*
         * Plain Bootstrap with glyphicons
         */
        if ('resource-table::bootstrap' === $this->_viewName) {
            $result .= '<a href="' . $this->sortUrl() . '" class="pull-right">';
            $glyphicon = 'glyphicon-sort';
            if ($this->sortActive()) {
                // Column is active - we can show proper icon
                $glyphicon = $this->sortDirection() === 'DESC' ? 'glyphicon-sort-by-attributes' : 'glyphicon-sort-by-attributes-alt';
            }
            $result .= '<i class="glyphicon ' . $glyphicon . '"></i>';
            $result .= '</a>';
        }
        /*
         * Just simple table
         */
        if (!$result) {
            $result .= '<a href="' . $this->sortUrl() . '" style="font-weight:' . ($this->sortActive() ? 'bold' : 'normal') . '">';
            $result .= $this->sortDirection() === 'DESC' ? '&#8595;' : '&#8593;';
            $result .= '</a>';
        }
        return $result;
    }