public function setReference(ViewReference $reference = null, $locale = null)
    {
        $locale = $locale ?: $this->getCurrentLocale();
        $this->references[$locale] = $reference;

        return $this;
    }