# Zugriff auf Artikel-Attribute in Controller

**URL:** <https://forum.shopware.com/t/zugriff-auf-artikel-attribute-in-controller/58821>\
**Category:** Programmierung\
**Created:** [28. März 2019 um 15:41 UTC](https://forum.shopware.com/t/zugriff-auf-artikel-attribute-in-controller/58821 "2019-03-28T15:41:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hnpw](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hnpw](https://forum.shopware.com/u/hnpw)\
**Post date:** [28. März 2019 um 15:41 UTC](https://forum.shopware.com/t/zugriff-auf-artikel-attribute-in-controller/58821/1 "2019-03-28T15:41:10Z")

</div>

Hallo,

ich möchte in meinem Controller, in dem ich ein Objekt habe:

```
$articleResource = \Shopware\Components\Api\Manager::getResource('Article');
$article = $articleResource->getOne($aid);

```

…alle Freitextfelder bzw. Attribute verwenden, d.h. ich brauche Zugriff auf den Bezeichner des Attributes in der aktuellen Sprache und den Wert. Ich kann bspw.&nbsp;so&nbsp;die Werte bekommen, aber ohne Bezeichner nützen die mir wenig:

```
foreach($article['propertyValues'] as $value)
{
        $value['value']);
}

```

Wie mache ich das?

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [1. April 2019 um 12:44 UTC](https://forum.shopware.com/t/zugriff-auf-artikel-attribute-in-controller/58821/2 "2019-04-01T12:44:29Z")

</div>

Du solltest hier den ProductService benutzen anstatt die API
