示例#1
0
 /**
  * Set the stream.
  *
  * @param EntryInterface $entry
  * @param                $config
  */
 protected function setStream(EntryInterface $entry, &$config)
 {
     $config['fields']['stream'] = $entry->getStreamSlug();
     $config['fields']['namespace'] = $entry->getStreamNamespace();
 }
 /**
  * Return the view URL.
  *
  * @return string
  */
 public function viewUrl()
 {
     return url(implode('/', array_unique(array_filter(['admin', $this->object->getStreamNamespace(), $this->object->getStreamSlug(), 'view', $this->object->getId()]))));
 }