protected static function setInvertToCreatedFilter(AbstractInvertLogItemFilter $filter, Zibo $zibo, $name, $configBase)
 {
     $configInvert = $configBase . Module::CONFIG_INVERT;
     $invert = $zibo->getConfigValue($configInvert);
     if ($invert !== null) {
         $filter->setInvert($invert);
     }
 }
Beispiel #2
0
 public static function createFilterFromConfig(Zibo $zibo, $name, $configBase)
 {
     $filter = new self();
     parent::setInvertToCreatedFilter($filter, $zibo, $name, $configBase);
     $configNames = $configBase . self::CONFIG_NAMES;
     $names = $zibo->getConfigValue($configNames);
     if ($names === null) {
         return $filter;
     }
     $names = explode(',', $names);
     foreach ($names as $name) {
         $name = trim($name);
         $filter->addAllowedName($name);
     }
     return $filter;
 }