Pimcore\Model\Document::getRealFullPath PHP Method

getRealFullPath() public method

Returns the full real path of the document.
public getRealFullPath ( ) : string
return string
    public function getRealFullPath()
    {
        $path = $this->getRealPath() . $this->getKey();
        return $path;
    }

Usage Example

Example #1
0
 /**
  * @param Model\Document $document
  * @throws \Zend_Json_Exception
  */
 protected function addPropertiesToDocument(Model\Document $document)
 {
     // properties
     if ($this->getParam("properties")) {
         $properties = [];
         // assign inherited properties
         foreach ($document->getProperties() as $p) {
             if ($p->isInherited()) {
                 $properties[$p->getName()] = $p;
             }
         }
         $propertiesData = \Zend_Json::decode($this->getParam("properties"));
         if (is_array($propertiesData)) {
             foreach ($propertiesData as $propertyName => $propertyData) {
                 $value = $propertyData["data"];
                 try {
                     $property = new Property();
                     $property->setType($propertyData["type"]);
                     $property->setName($propertyName);
                     $property->setCtype("document");
                     $property->setDataFromEditmode($value);
                     $property->setInheritable($propertyData["inheritable"]);
                     $properties[$propertyName] = $property;
                 } catch (\Exception $e) {
                     \Logger::warning("Can't add " . $propertyName . " to document " . $document->getRealFullPath());
                 }
             }
         }
         if ($document->isAllowed("properties")) {
             $document->setProperties($properties);
         }
     }
     // force loading of properties
     $document->getProperties();
 }
All Usage Examples Of Pimcore\Model\Document::getRealFullPath