Nag_Task::treeIcons PHP Method

treeIcons() public method

Returns the HTML code for any tree icons, when displaying this task in a tree view.
public treeIcons ( ) : string
return string The HTML code for necessary tree icons.
    public function treeIcons()
    {
        $foreground = $this->foregroundColor() == '#fff' ? '-fff' : '';
        $html = '';
        $parent = $this->parent;
        for ($i = 1; $i < $this->indent; ++$i) {
            if ($parent && $parent->lastChild) {
                $html = Horde::img('tree/blank' . $foreground . '.png') . $html;
            } else {
                $html = Horde::img('tree/line' . $foreground . '.png', '|') . $html;
            }
            $parent = $parent->parent;
        }
        if ($this->indent) {
            if ($this->lastChild) {
                $html .= Horde::img($GLOBALS['registry']->nlsconfig->curr_rtl ? 'tree/rev-joinbottom' . $foreground . '.png' : 'tree/joinbottom' . $foreground . '.png', '\\');
            } else {
                $html .= Horde::img($GLOBALS['registry']->nlsconfig->curr_rtl ? 'tree/rev-join' . $foreground . '.png' : 'tree/join' . $foreground . '.png', '+');
            }
        }
        return $html;
    }