UseMuffin / Footprint

CakePHP plugin to allow passing currently logged in user to model layer.
MIT License
95 stars 23 forks source link

Changing the _footprint option key #58

Closed elboletaire closed 5 years ago

elboletaire commented 5 years ago

Is there an easy way to set the option key (set by default to _footprint)?

By easy I mean without the need to rewrite a method (which is what I'm currently doing):

<?php
    use FootprintAwareTrait {
        footprint as realFootprint;
    }

    public function footprint(Event $event)
    {
        self::realFootprint($event);

        $this->_listener->setConfig('optionKey', '_customFootprintKey');
    }
ADmad commented 5 years ago

What you have shown is easy enough for a rarely required feature :slightly_smiling_face:.

elboletaire commented 5 years ago

Ok!