diff --git a/Controller/Api/LimiterApiController.php b/Controller/Api/LimiterApiController.php index 8c64ea5..303df56 100644 --- a/Controller/Api/LimiterApiController.php +++ b/Controller/Api/LimiterApiController.php @@ -81,7 +81,7 @@ public function getStyleAction() */ private function getViewFromLimiter($key) { - $limiter = $this->coreParametersHelper->getParameter('limiter'); + $limiter = $this->coreParametersHelper->get('limiter'); $view = $this->view(['response' => ArrayHelper::getValue($key, $limiter)]); return $this->handleView($view); @@ -92,7 +92,7 @@ private function getViewFromLimiter($key) */ public function getAction() { - $limiter = $this->coreParametersHelper->getParameter('limiter'); + $limiter = $this->coreParametersHelper->get('limiter'); if (isset($limiter[self::API_SECRET_KEY])) { unset($limiter[self::API_SECRET_KEY]); } @@ -147,7 +147,7 @@ private function processUpdate($key) return $this->handleView($view); } - $limiter = $this->coreParametersHelper->getParameter('limiter'); + $limiter = $this->coreParametersHelper->get('limiter'); $apiSecretKeyFromRequest = ArrayHelper::getValue(self::API_SECRET_KEY, $all); if (is_null($apiSecretKeyFromRequest)) { @@ -175,7 +175,7 @@ private function processUpdate($key) $toUpdate = ['limiter' => $limiter]; $this->configurator->mergeParameters($toUpdate); $this->configurator->write(); - $this->filesystem->remove($this->coreParametersHelper->getParameter('kernel.cache_dir')); + $this->filesystem->remove($this->coreParametersHelper->get('kernel.cache_dir')); $view = $this->view(['success' => '1'], Codes::HTTP_OK); return $this->handleView($view); diff --git a/Integration/LimiterSettings.php b/Integration/LimiterSettings.php index e4c9878..c329c8c 100644 --- a/Integration/LimiterSettings.php +++ b/Integration/LimiterSettings.php @@ -57,7 +57,7 @@ class LimiterSettings */ public function __construct(CoreParametersHelper $coreParametersHelper, Connection $connection) { - $limiter = $coreParametersHelper->getParameter('limiter', []); + $limiter = $coreParametersHelper->get('limiter', []); $this->limit = (int) ArrayHelper::getValue('limit', $limiter, 0); $this->message = (string) ArrayHelper::getValue('message', $limiter, ''); $this->style = (string) ArrayHelper::getValue('style', $limiter, ''); diff --git a/README.md b/README.md index b1737fd..2a2c404 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Limiter for Mautic +# Limiter for Mautic 3 + +_If you're interest Limiter for Mautic 2, please contact me._ This plugin disable Mautic features after extend limit of number of identified contacts. You can hide create new contact, new email, campaigns or editation too.