public function encodeControlLayers(Layers $layers, Encoder $encoder)
    {
        return sprintf(
            '%s = L.control.layers(%s, %s, %s);',
            $encoder->encodeReference($layers),
            $this->encodeLayersInformation($layers->getBaseLayers(), $encoder),
            $this->encodeLayersInformation($layers->getOverlays(), $encoder),
            $encoder->encodeValue($layers->getOptions())
        );
    }
public function encodeControlLayers(Layers $layers, Encoder $encoder)
    {
        return sprintf(
            '%s = L.control.layers(%s, %s, %s);',
            $encoder->encodeReference($layers),
            $this->encodeLayersInformation($layers->getBaseLayers(), $encoder),
            $this->encodeLayersInformation($layers->getOverlays(), $encoder),
            $encoder->encodeValue($layers->getOptions())
        );
    }
public function encodeControlLayers ( Layers $ layers , Encoder $ encoder ) { return sprintf ( '%s = L.control.layers(%s, %s, %s);' , $ encoder -> encodeReference ( $ layers ) , $ this -> encodeLayersInformation ( $ layers -> getBaseLayers ( ) , $ encoder ) , $ this -> encodeLayersInformation ( $ layers -> getOverlays ( ) , $ encoder ) , $ encoder -> encodeValue ( $ layers -> getOptions ( ) ) ) ; }
Compile layer control.

@param Layers  $layers  The layers control.
@param Encoder $encoder The encoder.

@return bool
Compile layer control .