private function addTranslations(Writer $writer)
    {
        foreach ($this->translations as $translation) {
            $writer->write([
                [
                    'name'       => 'xhtml:link',
                    'attributes' => [
                        'rel'      => 'alternate',
                        'hreflang' => $translation['hreflang'],
                        'href'     => $translation['href']
                    ],
                    'value'      => null
                ]
            ]);
        }
    }
private function addTranslations(Writer $writer)
    {
        foreach ($this->translations as $translation) {
            $writer->write([
                [
                    'name'       => 'xhtml:link',
                    'attributes' => [
                        'rel'      => 'alternate',
                        'hreflang' => $translation['hreflang'],
                        'href'     => $translation['href']
                    ],
                    'value'      => null
                ]
            ]);
        }
    }
private function addTranslations ( Writer $ writer ) { foreach ( $ this -> translations as $ translation ) { $ writer -> write ( [ [ 'name' => 'xhtml:link' , 'attributes' => [ 'rel' => 'alternate' , 'hreflang' => $ translation [ 'hreflang' ] , 'href' => $ translation [ 'href' ] ] , 'value' => null ] ] ) ; } }
Used for serialization.

@param Writer $writer
Used for serialization .