Pimcore\Model\Document\Hardlink::getProperties PHP Method

getProperties() public method

public getProperties ( ) : array | null | Property[]
return array | null | Pimcore\Model\Property[]
    public function getProperties()
    {
        if ($this->properties === null) {
            $properties = parent::getProperties();
            if ($this->getPropertiesFromSource() && $this->getSourceDocument()) {
                $sourceProperties = $this->getSourceDocument()->getProperties();
                foreach ($sourceProperties as &$prop) {
                    $prop = clone $prop;
                    // because of cache
                    $prop->setInherited(true);
                }
                $properties = array_merge($sourceProperties, $properties);
            } elseif ($this->getSourceDocument()) {
                $sourceProperties = $this->getSourceDocument()->getDao()->getProperties(false, true);
                foreach ($sourceProperties as &$prop) {
                    $prop = clone $prop;
                    // because of cache
                    $prop->setInherited(true);
                }
                $properties = array_merge($sourceProperties, $properties);
            }
            $this->setProperties($properties);
        }
        return $this->properties;
    }