Hi all, who can tell me the correct way to extend an existing widget? Considering the advanced installation of Yii2 which folder should I build the structure?
In /common/component/… or other ?
thanks
Hi all, who can tell me the correct way to extend an existing widget? Considering the advanced installation of Yii2 which folder should I build the structure?
In /common/component/… or other ?
thanks
Framework doesn’t force you to put your classes in cetain locations so use what makes sense to you. I’d mimic original widget parent dirs.
Good choice.
Is there anyway to write in short code ? Ex:
Yii:$app
or
Yii:$app->request
, i want to write in: app(), and create a function to handle it
function app() { return Yii:$app; }
Is it safe for use it as global config ? Where’s the best place ?
Thanks
Yes, it’s OK. Just don’t use such code in anything publically distributable such an extension.