protected function PartyAcquisition::setContext in Party 7
Set up the context by merging in defaults.
This method may be overridden for classes to add, remove or alter both the default context, but also the processed context.
Parameters
array $context: The context we want merged with the defaults. Anything in $context will take precedence over the defaults.
1 call to PartyAcquisition::setContext()
- PartyAcquisition::acquire in includes/
party.acquisition.inc - Create or acquire a party based off the given parameters.
File
- includes/
party.acquisition.inc, line 105 - Base classes for acquisition processes.
Class
- PartyAcquisition
- Base class for acquiring parties.
Code
protected function setContext($context) {
$defaults = $this->default_context;
$defaults['behavior'] = variable_get('party_acquisition_behavior', self::BEHAVIOR_CREATE);
$this->context = is_array($context) ? $context + $defaults : $defaults;
}