Hello twisted1919 and other users.
I want write new extensions and have some questions:
1. I want to block sending emails for some users in campaign by my rules. I find sending in apps/console/commands/SendCampaignsCommand.php:482 but in processSubscribersLoop($params) has no events to block sending.
Can I add:
Or in any another place to disable sending to subscriber.
2. How can I override some core classes. Know how I can overwrite Controllers by controllerMap. How can I override Console commands (question 1) or core models?
3. Is it possible extend view (not replace)?
4. For example: different extensions override same controller. After that work only code from last extension not both?
I want write new extensions and have some questions:
1. I want to block sending emails for some users in campaign by my rules. I find sending in apps/console/commands/SendCampaignsCommand.php:482 but in processSubscribersLoop($params) has no events to block sending.
Can I add:
PHP:
$subscribers = $this->findSubscribers($offset, $limit);
//add event
$subscribers = Yii::app()->hooks->applyFilters('console_command_send_campaigns_after_find_subscribers', $subscribers, $campaign);
2. How can I override some core classes. Know how I can overwrite Controllers by controllerMap. How can I override Console commands (question 1) or core models?
3. Is it possible extend view (not replace)?
4. For example: different extensions override same controller. After that work only code from last extension not both?
Last edited: