src/DataDefinition/Palette/Builder/PaletteBuilder.php
public function chainDefaultPaletteCondition()
    {
        if (!$this->palette) {
            throw new DcGeneralRuntimeException(
                'Does not know where to create the property-value condition, please create a palette or property first'
            );
        }

        $this->createPaletteConditionChain();

        $condition = $this->defaultPaletteConditionClass->newInstance();
        $event     = new CreateDefaultPaletteConditionEvent($condition, $this);
        $this->dispatchEvent($event);
        $condition = $event->getDefaultPaletteCondition();

        $event = new CreateConditionEvent($condition, $this);
        $this->dispatchEvent($event);
        $condition = $event->getCondition();

        $this->condition->addCondition($condition);

        return $this;
    }
public function chainDefaultPaletteCondition()
    {
        if (!$this->palette) {
            throw new DcGeneralRuntimeException(
                'Does not know where to create the property-value condition, please create a palette or property first'
            );
        }

        $this->createPaletteConditionChain();

        $condition = $this->defaultPaletteConditionClass->newInstance();
        $event     = new CreateDefaultPaletteConditionEvent($condition, $this);
        $this->dispatchEvent($event);
        $condition = $event->getDefaultPaletteCondition();

        $event = new CreateConditionEvent($condition, $this);
        $this->dispatchEvent($event);
        $condition = $event->getCondition();

        $this->condition->addCondition($condition);

        return $this;
    }
public function chainDefaultPaletteCondition ( ) { if ( ! $ this -> palette ) { throw new DcGeneralRuntimeException ( 'Does not know where to create the property-value condition, please create a palette or property first' ) ; } $ this -> createPaletteConditionChain ( ) ; $ condition = $ this -> defaultPaletteConditionClass -> newInstance ( ) ; $ event = new CreateDefaultPaletteConditionEvent ( $ condition , $ this ) ; $ this -> dispatchEvent ( $ event ) ; $ condition = $ event -> getDefaultPaletteCondition ( ) ; $ event = new CreateConditionEvent ( $ condition , $ this ) ; $ this -> dispatchEvent ( $ event ) ; $ condition = $ event -> getCondition ( ) ; $ this -> condition -> addCondition ( $ condition ) ; return $ this ; }
Start a new default-palette condition and chain with previous condition.

@return PaletteBuilder

@throws DcGeneralRuntimeException When no palette or property has been stored.
Start a new default - palette condition and chain with previous condition .