src/DataDefinition/Palette/Builder/PaletteBuilder.php
public function addCondition($condition, $scope = self::VISIBLE)
    {
        if ($condition instanceof PaletteConditionInterface) {
            $this->addPaletteCondition($condition);
            return $this;
        }

        if ($condition instanceof PropertyConditionInterface) {
            $this->addPropertyCondition($condition, $scope);
            return $this;
        }

        $type = \is_object($condition) ? \get_class($condition) : \gettype($condition);
        throw new DcGeneralInvalidArgumentException('Cannot handle condition of type [' . $type . ']');
    }
public function addCondition($condition, $scope = self::VISIBLE)
    {
        if ($condition instanceof PaletteConditionInterface) {
            $this->addPaletteCondition($condition);
            return $this;
        }

        if ($condition instanceof PropertyConditionInterface) {
            $this->addPropertyCondition($condition, $scope);
            return $this;
        }

        $type = \is_object($condition) ? \get_class($condition) : \gettype($condition);
        throw new DcGeneralInvalidArgumentException('Cannot handle condition of type [' . $type . ']');
    }
public function addCondition ( $ condition , $ scope = self :: VISIBLE ) { if ( $ condition instanceof PaletteConditionInterface ) { $ this -> addPaletteCondition ( $ condition ) ; return $ this ; } if ( $ condition instanceof PropertyConditionInterface ) { $ this -> addPropertyCondition ( $ condition , $ scope ) ; return $ this ; } $ type = \ is_object ( $ condition ) ? \ get_class ( $ condition ) : \ gettype ( $ condition ) ; throw new DcGeneralInvalidArgumentException ( 'Cannot handle condition of type [' . $ type . ']' ) ; }
Add a custom condition to last created property or palette.

@param PaletteConditionInterface|PropertyConditionInterface $condition The condition to add.
@param string                                               $scope     The scope.

@return PaletteBuilder

@throws DcGeneralInvalidArgumentException When an unknown condition type is passed.
Add a custom condition to last created property or palette .