src/DataDefinition/Palette/Builder/PaletteBuilder.php
public function useLegend(LegendInterface $legend)
    {
        if ($this->legend) {
            $this->finishLegend();
        }

        $event = new UseLegendEvent($legend, $this);
        $this->dispatchEvent($event);
        $this->legend = $legend;

        return $this;
    }
public function useLegend(LegendInterface $legend)
    {
        if ($this->legend) {
            $this->finishLegend();
        }

        $event = new UseLegendEvent($legend, $this);
        $this->dispatchEvent($event);
        $this->legend = $legend;

        return $this;
    }
public function useLegend ( LegendInterface $ legend ) { if ( $ this -> legend ) { $ this -> finishLegend ( ) ; } $ event = new UseLegendEvent ( $ legend , $ this ) ; $ this -> dispatchEvent ( $ event ) ; $ this -> legend = $ legend ; return $ this ; }
Reuse an existing legend.

@param LegendInterface $legend The legend.

@return PaletteBuilder
Reuse an existing legend .