示例#1
0
 /**
  * Setup notification fields and pass various dependencies to the View.
  */
 public function render()
 {
     $gateway = new NotificationGateway($this->component->getDb());
     $select = $gateway->selectByComponent($this->component->getFullyQualifiedName());
     $fields = $gateway->buildFields($this->component->url('notification-edit'), $this->component->getFields());
     $this->view->assign(['fields' => $fields, 'listing' => new Listing($select, $gateway->field('dewdrop_notification_subscription_id')), 'component' => $this->component, 'componentModel' => $this->component->getPrimaryModel()]);
     return $this->renderView();
 }
示例#2
0
 public function getUploadPath()
 {
     if (!$this->uploadPath) {
         /* @var $paths \Dewdrop\Paths */
         $paths = Pimple::getResource('paths');
         $root = $paths->getAppRoot();
         $this->uploadPath = $root . '/private-uploads/dewdrop-import/' . str_replace('/', '__', $this->component->getFullyQualifiedName());
     }
     return $this->uploadPath;
 }