Newscoop\Entity\Theme::getPath PHP Метод

getPath() публичный Метод

Provides the path of the theme.
public getPath ( ) : string
Результат string The path of the theme.
    public function getPath()
    {
        return $this->path;
    }

Usage Example

Пример #1
0
 /**
  * Fetch item metadata
  *
  * @param string $key
  * @return object
  */
 public function fetchMetadata($key)
 {
     $item = $this->storage->getItem($key);
     $metadata = array('key' => $item->getKey(), 'name' => $item->getName(), 'type' => $item->getType(), 'realpath' => $this->storage->getRealpath($key));
     if (!$item->isDir()) {
         $metadata += array('size' => $item->getSize(), 'ctime' => $item->getChangeTime());
         if ($metadata['type'] == 'tpl') {
             $template = $this->repository->getTemplate($key, false);
             // get the resource for the template id
             $resource = $this->syncResServ->findByPathOrId(rtrim($this->theme->getPath(), "/") . "/" . ltrim($key, "/"));
             /* @var $resource Newscoop\Entity\Resource */
             $metadata += array('id' => is_object($resource) ? $resource->getId() : $template->getId(), 'ttl' => $template->getCacheLifetime());
         }
     }
     return (object) $metadata;
 }
All Usage Examples Of Newscoop\Entity\Theme::getPath