src/objects/ElementMutatorTrait.php
public function setElement($element = null)
    {
        $this->element = null;

        if (!$element = $this->internalResolveElement($element)) {
            $this->element = $this->elementId = null;
        } else {
            /** @var Element $element */
            $this->elementId = $element->id;
            $this->element = $element;
        }

        return $this;
    }
public function setElement($element = null)
    {
        $this->element = null;

        if (!$element = $this->internalResolveElement($element)) {
            $this->element = $this->elementId = null;
        } else {
            /** @var Element $element */
            $this->elementId = $element->id;
            $this->element = $element;
        }

        return $this;
    }
public function setElement ( $ element = null ) { $ this -> element = null ; if ( ! $ element = $ this -> internalResolveElement ( $ element ) ) { $ this -> element = $ this -> elementId = null ; } else { /** @var Element $element */ $ this -> elementId = $ element -> id ; $ this -> element = $ element ; } return $ this ; }
Associate a element

@param mixed $element
@return $this
Associate a element