/**
* Returns an array collection of Shopware\Models\User\Privilege model instances,
* which defines whether the user has rights to a shared Privilege.
*
* @return \Doctrine\Common\Collections\ArrayCollection
*/
public function getPrivileges() { $privileges =
new \Doctrine\Common\Collections\
ArrayCollection();
foreach ($this->
getRules() as $rule) { $privileges->
add($rule->
getPrivilege());
} return $privileges;
} /**
* Returns an array collection of Shopware\Models\User\Role model instances, which
* contains all inherited child roles. The association is defined over
* the Role.id property and the Role.parentId property.
*
* @return \Doctrine\Common\Collections\ArrayCollection
*/