```php
public function beforeAction($action)
{
    // ...set `$this->enableCsrfValidation` here based on some conditions...
    return parent::beforeAction($action);
}