diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index a8146128e..a08a8dff7 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -59,6 +59,21 @@ sub path_to_email_templates { return $paths; } +=item feature + +A helper utility to let you provide per-cobrand hooks for configuration. +Mostly useful if running a site with multiple cobrands. + +=cut + +sub feature { + my ($self, $feature) = @_; + my $features = FixMyStreet->config('COBRAND_FEATURES'); + return unless $features && ref $features eq 'HASH'; + return unless $features->{$feature} && ref $features->{$feature} eq 'HASH'; + return $features->{$feature}->{$self->moniker}; +} + =item password_minimum_length Returns the minimum length a password can be set to. |