# override core classes

**URL:** <https://forum.shopware.com/t/override-core-classes/42744>\
**Category:** Programmierung\
**Created:** [12. Januar 2017 um 15:12 UTC](https://forum.shopware.com/t/override-core-classes/42744 "2017-01-12T15:12:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![portrino](https://avatars.discourse-cdn.com/v4/letter/p/e9bcb4/32.png) [@portrino](https://forum.shopware.com/u/portrino)\
**Post date:** [12. Januar 2017 um 15:12 UTC](https://forum.shopware.com/t/override-core-classes/42744/1 "2017-01-12T15:12:02Z")

</div>

We have to use some code from sAdmin.php class which is unfortunatly protected.

Is it possible to override the sAdmin.php class to make some method public accessible?

---

<div class="post-metadata">

**Author:** ![DanielNogel](https://avatars.discourse-cdn.com/v4/letter/d/96bed5/32.png) [@DanielNogel](https://forum.shopware.com/u/DanielNogel)\
**Post date:** [12. Januar 2017 um 17:15 UTC](https://forum.shopware.com/t/override-core-classes/42744/2 "2017-01-12T17:15:03Z")

</div>

Hi,

sure, protected Methods in Core-Classes can be hooked:&nbsp;[Shopware events](https://developers.shopware.com/developers-guide/event-guide/#hooks)

In your case you can register to sAdmin::YOUR\_METHOD::after - for example.

Best regards,&nbsp;

Daniel
