Пример #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
 /**
  * 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();
 }
Пример #4
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();
 }