Category: Snippets
How to automatically prepend title in Yii2 application?
Click read more to check gist code.
How to add template identifier in Yii2 HTML output
Sometimes it’s nice to know which template is currently rendered, just by looking into HTML source. It saves a lot of time if your application is really big.
How to replace one GET var in Yii 1.1.* when using form?
I’ve needed URL with one variable replaced so it wouldn’t be duplicated every request. I’ve came up with this simple solution:
How to change mass edit limit in Vtiger 6.5
Sometimes you need to make mass operation on houndreds of records in Vtiger. Well in this case it’s 500 ones maximum… Well this is kinda stupid because it can surely handle up to thousands. How do I know? I’ve hacked the code and successfully converted 2000 leads 🙂 Well it takes some time but it […]
Log model error after save
This code: $model = new SomeModel(); $model->attributes = $attributes; $model->save(); Yii::log(“errors saving SomeModel: ” . var_export($model->getErrors(), true)); Will log: 2014/07/31 22:57:59 [info] [application] errors saving SomeModel: array ( ‘date’ => array ( 0 => ‘Date cannot be blank.’, ), )