From d881871a2504a2554123bd4dd67a7d73ebc466da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20K=C3=B6string?= Date: Tue, 16 Jun 2015 08:26:23 +0200 Subject: [PATCH 1/3] Added itemprop to allowed attributes --- src/Helper/HeadLink.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Helper/HeadLink.php b/src/Helper/HeadLink.php index a7fcc45c..1a640595 100644 --- a/src/Helper/HeadLink.php +++ b/src/Helper/HeadLink.php @@ -46,7 +46,8 @@ class HeadLink extends Placeholder\Container\AbstractStandalone 'sizes', 'type', 'title', - 'extras' + 'extras', + 'itemprop' ]; /** From 22c2df9fbff1089b7af3fbda8a883fa32e2cf024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20K=C3=B6string?= Date: Wed, 17 Jun 2015 18:06:38 +0200 Subject: [PATCH 2/3] Added Unittest --- test/Helper/HeadLinkTest.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/Helper/HeadLinkTest.php b/test/Helper/HeadLinkTest.php index 1469cf75..4ddf80cb 100644 --- a/test/Helper/HeadLinkTest.php +++ b/test/Helper/HeadLinkTest.php @@ -445,4 +445,10 @@ public function testSizesAttributeIsSupported() $this->helper->appendStylesheet(['rel' => 'icon', 'href' => '/bar/baz', 'sizes' => '123x456']); $this->assertContains('sizes="123x456"', $this->helper->toString()); } + + public function testItempropAttributeIsSupported() + { + $this->helper->prependAlternate(['itemprop' => 'url', 'href' => '/bar/baz', 'rel' => 'canonical']); + $this->assertContains('itemprop="url"', $this->helper->toString()); + } } From 7ab473db05bec045f4ffff40a14c102a1225607c Mon Sep 17 00:00:00 2001 From: Matthew Weier O'Phinney Date: Tue, 23 Jun 2015 16:15:24 -0500 Subject: [PATCH 3/3] Added CHANGELOG entry for #5 --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7a7934f..f106eac1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,8 @@ All notable changes to this project will be documented in this file, in reverse ### Added -- Nothing. +- [#5](https://github.com/zendframework/zend-view/pull/5) adds support for the + `itemprop` attribute in the `headLink()` view helper. ### Deprecated