0

I created Controller that exptends Craft AssetsController. Hovewer some of AssetsController methods are private - and I cannot use them using $this context in child module, so i just copied them to child module.

Is there any other way?

  • 1
    As they have a private scope, short answer is no. Extending and duping as you currently do. However, it depends on the context and what you want to achieve really, is it a new endpoint and what's the purpose? We would be able to provide better help with extra details – RoussKS Feb 20 '20 at 20:18
  • @RoussKS - I created my own asset controller that does some specific things to uploaded file and works over ajax. And i need methods like _requirePeerPermissionByAsset which are private in AssetsController. – piotrpog Feb 21 '20 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.