protected function applyConfig(array $moduleConfiguration)
    {
        foreach ($moduleConfiguration['smarty_filter'] as $smartyFilterData) {
            if (SmartyFilterQuery::create()->findOneByCode($smartyFilterData['code']) === null) {
                $smartyFilter = (new SmartyFilter())
                    ->setCode($smartyFilterData['code']);

                foreach ($smartyFilterData['descriptive'] as $descriptiveData) {
                    $smartyFilter
                        ->setLocale($descriptiveData['locale'])
                        ->setTitle($descriptiveData['title'])
                        ->setDescription($descriptiveData['description'])
                        ->setFiltertype($descriptiveData['type']);
                }

                $smartyFilter->save();
            }
        }
    }
protected function applyConfig(array $moduleConfiguration)
    {
        foreach ($moduleConfiguration['smarty_filter'] as $smartyFilterData) {
            if (SmartyFilterQuery::create()->findOneByCode($smartyFilterData['code']) === null) {
                $smartyFilter = (new SmartyFilter())
                    ->setCode($smartyFilterData['code']);

                foreach ($smartyFilterData['descriptive'] as $descriptiveData) {
                    $smartyFilter
                        ->setLocale($descriptiveData['locale'])
                        ->setTitle($descriptiveData['title'])
                        ->setDescription($descriptiveData['description'])
                        ->setFiltertype($descriptiveData['type']);
                }

                $smartyFilter->save();
            }
        }
    }
protected function applyConfig ( array $ moduleConfiguration ) { foreach ( $ moduleConfiguration [ 'smarty_filter' ] as $ smartyFilterData ) { if ( SmartyFilterQuery :: create ( ) -> findOneByCode ( $ smartyFilterData [ 'code' ] ) === null ) { $ smartyFilter = ( new SmartyFilter ( ) ) -> setCode ( $ smartyFilterData [ 'code' ] ) ; foreach ( $ smartyFilterData [ 'descriptive' ] as $ descriptiveData ) { $ smartyFilter -> setLocale ( $ descriptiveData [ 'locale' ] ) -> setTitle ( $ descriptiveData [ 'title' ] ) -> setDescription ( $ descriptiveData [ 'description' ] ) -> setFiltertype ( $ descriptiveData [ 'type' ] ) ; } $ smartyFilter -> save ( ) ; } } }
Save new smarty filter to database

@param array $moduleConfiguration Smarty Filter module configuration
Save new smarty filter to database