My goal is to override the function isApprovalRequired() in a Trait for the module Social Auth (social_auth). The file:
modules/contrib/social_auth/src/SettingsTrait.php
has a function (along with variables and other functions):
namespace Drupal\social_auth;
use Drupal\Core\Url;
use Drupal\user\UserInterface;
use Symfony\Component\HttpFoundation\RedirectResponse;
/**
* Helper methods for Social Auth and Drupal settings.
*/
trait SettingsTrait {
...
protected $configFactory;
...
protected function isApprovalRequired() {
that I would like to overwrite. How do I overwrite JUST that one function in my own module? I've done similar things with classes before, but not sure what to do with a Trait.