src/DataDefinition/Palette/Builder/PaletteBuilder.php
public function finishCondition(&$condition = null)
    {
        if (!$this->condition) {
            throw new DcGeneralRuntimeException('Condition is missing, please create a condition first');
        }

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

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

        return $this;
    }
public function finishCondition(&$condition = null)
    {
        if (!$this->condition) {
            throw new DcGeneralRuntimeException('Condition is missing, please create a condition first');
        }

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

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

        return $this;
    }
public function finishCondition ( & $ condition = null ) { if ( ! $ this -> condition ) { throw new DcGeneralRuntimeException ( 'Condition is missing, please create a condition first' ) ; } $ event = new FinishConditionEvent ( $ this -> condition , $ this ) ; $ this -> dispatchEvent ( $ event ) ; $ condition = $ event -> getCondition ( ) ; $ this -> addCondition ( $ condition ) ; $ this -> condition = null ; return $ this ; }
Finish the current condition.

@param PropertyConditionInterface|PaletteConditionInterface $condition Return the final condition.

@return PaletteBuilder

@throws DcGeneralRuntimeException If no condition is stored in the builder.
Finish the current condition .