public function registerCondition($name, $className)
    {
        if (false === is_string($name)) {
            throw InvalidArgumentTypeException::conditionNameNotString($name);
        }

        if (false === class_exists($className)) {
            throw ClassNotFoundException::conditionClassNameNotFound($name, $className);
        }

        if (false === in_array(ConditionItemInterface::class, class_implements($className))) {
            throw InvalidArgumentTypeException::conditionClassNameNotValid($className);
        }

        $this->conditions[$name] = $className;

        return $this;
    }
public function registerCondition($name, $className)
    {
        if (false === is_string($name)) {
            throw InvalidArgumentTypeException::conditionNameNotString($name);
        }

        if (false === class_exists($className)) {
            throw ClassNotFoundException::conditionClassNameNotFound($name, $className);
        }

        if (false === in_array(ConditionItemInterface::class, class_implements($className))) {
            throw InvalidArgumentTypeException::conditionClassNameNotValid($className);
        }

        $this->conditions[$name] = $className;

        return $this;
    }
public function registerCondition ( $ name , $ className ) { if ( false === is_string ( $ name ) ) { throw InvalidArgumentTypeException :: conditionNameNotString ( $ name ) ; } if ( false === class_exists ( $ className ) ) { throw ClassNotFoundException :: conditionClassNameNotFound ( $ name , $ className ) ; } if ( false === in_array ( ConditionItemInterface :: class , class_implements ( $ className ) ) ) { throw InvalidArgumentTypeException :: conditionClassNameNotValid ( $ className ) ; } $ this -> conditions [ $ name ] = $ className ; return $ this ; }
Use this function to register a new condition type which can then be used
in the TypoScript configuration. This function should be called from
`ext_localconf.php`.

The name of the condition must be a valid string, which will be then be
used as the identifier for the TypoScript conditions. By convention, you
should use the following syntax: `extension_name.condition_name`.

The condition class must implement the interface
`ConditionItemInterface`.

@param string $name      The name of the condition, which will then be available for TypoScript conditions.
@param string $className Class which will process the condition.
@return $this
@throws ClassNotFoundException
@throws InvalidArgumentTypeException
Use this function to register a new condition type which can then be used in the TypoScript configuration . This function should be called from ext_localconf . php .