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

        if ($this->condition) {
            $this->finishCondition();
        }

        $properties = \is_object($this->property) ? [$this->property] : $this->property;

        foreach ($properties as $index => $tempProperty) {
            $event = new FinishPropertyEvent($tempProperty, $this);
            $this->dispatchEvent($event);
            $properties[$index] = $event->getProperty();
        }

        if ($this->legend) {
            $this->legend->addProperties($properties);
        }

        $property = $properties;

        $this->property = null;

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

        if ($this->condition) {
            $this->finishCondition();
        }

        $properties = \is_object($this->property) ? [$this->property] : $this->property;

        foreach ($properties as $index => $tempProperty) {
            $event = new FinishPropertyEvent($tempProperty, $this);
            $this->dispatchEvent($event);
            $properties[$index] = $event->getProperty();
        }

        if ($this->legend) {
            $this->legend->addProperties($properties);
        }

        $property = $properties;

        $this->property = null;

        return $this;
    }
public function finishProperty ( & $ property = null ) { if ( ! $ this -> property ) { throw new DcGeneralRuntimeException ( 'Property is missing, please create a property first' ) ; } if ( $ this -> condition ) { $ this -> finishCondition ( ) ; } $ properties = \ is_object ( $ this -> property ) ? [ $ this -> property ] : $ this -> property ; foreach ( $ properties as $ index => $ tempProperty ) { $ event = new FinishPropertyEvent ( $ tempProperty , $ this ) ; $ this -> dispatchEvent ( $ event ) ; $ properties [ $ index ] = $ event -> getProperty ( ) ; } if ( $ this -> legend ) { $ this -> legend -> addProperties ( $ properties ) ; } $ property = $ properties ; $ this -> property = null ; return $ this ; }
Finish the current property or set of properties.

@param PropertyInterface|PropertyInterface[] $property Return the final property or set of properties.

@return PaletteBuilder

@throws DcGeneralRuntimeException When no property is stored in the builder.
Finish the current property or set of properties .