コード例 #1
0
 /**
  * Return a table of existing post type assignments.
  *
  * @param AssignmentTableBuilder      $table
  * @param TypeRepositoryInterface     $types
  * @param BreadcrumbCollection        $breadcrumbs
  * @param                             $id
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function fields(AssignmentTableBuilder $table, TypeRepositoryInterface $types, BreadcrumbCollection $breadcrumbs, $id)
 {
     $type = $types->find($id);
     $breadcrumbs->put($type->getName(), 'admin/posts/types/edit/' . $type->getId());
     $breadcrumbs->put('module::breadcrumb.fields', 'admin/posts/types/fields/' . $type->getId());
     return $table->setButtons(['edit' => ['href' => '{request.path}/assignment/{entry.id}']])->setStream($type->getEntryStream())->render();
 }
コード例 #2
0
 /**
  * Return a table of existing folder assignments.
  *
  * @param AssignmentTableBuilder      $table
  * @param FolderRepositoryInterface   $folders
  * @param                             $id
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function fields(AssignmentTableBuilder $table, FolderRepositoryInterface $folders, $id)
 {
     /* @var FolderInterface $folder */
     $folder = $folders->find($id);
     $this->breadcrumbs->put($folder->getName(), 'admin/files/folders/edit/' . $folder->getId());
     $this->breadcrumbs->put('streams::breadcrumb.assignments', 'admin/files/folders/assignments/' . $folder->getId());
     return $table->setButtons(['edit' => ['href' => '{request.path}/assignment/{entry.id}']])->setStream($folder->getEntryStream())->render();
 }
コード例 #3
0
 /**
  * Handle the command.
  */
 public function handle()
 {
     if (!$this->builder->getStream()) {
         $parts = explode('\\', str_replace('AssignmentTableBuilder', 'Model', get_class($this->builder)));
         unset($parts[count($parts) - 2]);
         $model = implode('\\', $parts);
         $this->builder->setStream(app($model)->getStream());
     }
 }
コード例 #4
0
 /**
  * Return an index of existing assignments.
  *
  * @param AssignmentTableBuilder  $table
  * @param TypeRepositoryInterface $types
  * @param                         $type
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function index(AssignmentTableBuilder $table, TypeRepositoryInterface $types, $type)
 {
     /* @var TypeInterface $type */
     $type = $types->find($type);
     return $table->setStream($type->getEntryStream())->render();
 }
コード例 #5
0
 /**
  * @param AssignmentTableBuilder    $table
  * @param StreamRepositoryInterface $streams
  * @param DiskRepositoryInterface   $disks
  * @param                           $id
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function index(AssignmentTableBuilder $table, StreamRepositoryInterface $streams, DiskRepositoryInterface $disks, $id)
 {
     /* @var DiskInterface $disk */
     $disk = $disks->find($id);
     return $table->setStream($streams->findBySlugAndNamespace($disk->getSlug(), 'files'))->render();
 }
コード例 #6
0
 /**
  * Return an index of existing fields.
  *
  * @param FieldTableBuilder $table
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function index(AssignmentTableBuilder $table, UserModel $users)
 {
     $table->setOption('sortable', true)->setStream($users->getStream());
     return $table->render();
 }
コード例 #7
0
 /**
  * Return a table of existing page type assignments.
  *
  * @param AssignmentTableBuilder      $table
  * @param TypeRepositoryInterface     $types
  * @param BreadcrumbCollection        $breadcrumbs
  * @param                             $id
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function fields(AssignmentTableBuilder $table, TypeRepositoryInterface $types, BreadcrumbCollection $breadcrumbs, $id)
 {
     $type = $types->find($id);
     return $table->setButtons(['edit' => ['href' => '{request.path}/assignment/{entry.id}']])->setStream($type->getEntryStream())->render();
 }
コード例 #8
0
 /**
  * Return a table of existing partial type assignments.
  *
  * @param AssignmentTableBuilder      $table
  * @param TypeRepositoryInterface     $types
  * @param BreadcrumbCollection        $breadcrumbs
  * @param                             $id
  * @return \Symfony\Component\HttpFoundation\Response
  */
 public function fields(AssignmentTableBuilder $table, TypeRepositoryInterface $types, BreadcrumbCollection $breadcrumbs, $id)
 {
     $type = $types->find($id);
     $breadcrumbs->put('module::breadcrumb.fields', 'admin/partials/types/fields/' . $type->getId());
     return $table->setButtons(['edit' => ['href' => '{request.path}/assignment/{entry.id}']])->setOption('title', $type->getName() . ' fields')->setOption('description', 'This is a list of assigned fields for the "' . $type->getName() . '" partial type')->setStream($type->getEntryStream())->render();
 }