Yii commands I keep forgetting
Been using Yii for a while now and there are several functions that I need to use from time to time that don't seem to want to stay in my brain. Most of them seem kind of obvious now that they are in front of me which is why this is so annoying! It's usually quite difficult to Google them because they are related to doing ordinary Yii type things and so I can't make the search specific enough to narrow it down.
Here is a pretty good guide to creating URLs in Yii2 which contains the things I want (amongst others) but these are the few I use when I need them.
http://www.bsourcecode.com/yiiframework2/yii2-url-creation/
Creating a URL without the wrapping anchor tag
This is handy when you need to generate a URL in order to place inside some Javascript.
Yii1
echo Yii::app()->createUrl("recording/scheduler_data");
Yii2
Yii::$app->urlManager->createAbsoluteUrl(["news/view", "id"=>$id]);
Creating Javascript names using compatible with Yii models
echo Chtml::activeId($model, 'model_field_name'); // RepeatRecordForm_repeat_from
echo Chtml::activeName($model, 'model_field_name'); // RepeatRecordForm[repeat_from]
More to come but I haven't got time to dig them out at the moment.
No feedback yet
Form is loading...