@@ 617-630 (lines=14) @@ | ||
614 | * @param HTTPRequest $request |
|
615 | * @return Form |
|
616 | */ |
|
617 | public function fileEditForm($request = null) |
|
618 | { |
|
619 | // Get ID either from posted back value, or url parameter |
|
620 | if (!$request) { |
|
621 | $this->httpError(400); |
|
622 | return null; |
|
623 | } |
|
624 | $id = $request->param('ID'); |
|
625 | if (!$id) { |
|
626 | $this->httpError(400); |
|
627 | return null; |
|
628 | } |
|
629 | return $this->getFileEditForm($id); |
|
630 | } |
|
631 | ||
632 | /** |
|
633 | * The form is used to generate a form schema, |
|
@@ 652-665 (lines=14) @@ | ||
649 | * @param HTTPRequest $request |
|
650 | * @return Form |
|
651 | */ |
|
652 | public function fileInsertForm($request = null) |
|
653 | { |
|
654 | // Get ID either from posted back value, or url parameter |
|
655 | if (!$request) { |
|
656 | $this->httpError(400); |
|
657 | return null; |
|
658 | } |
|
659 | $id = $request->param('ID'); |
|
660 | if (!$id) { |
|
661 | $this->httpError(400); |
|
662 | return null; |
|
663 | } |
|
664 | return $this->getFileInsertForm($id); |
|
665 | } |
|
666 | ||
667 | /** |
|
668 | * The form used to generate a form schema, since it's used directly on API endpoints, |
|
@@ 685-698 (lines=14) @@ | ||
682 | * @param HTTPRequest $request |
|
683 | * @return Form |
|
684 | */ |
|
685 | public function fileEditorLinkForm($request = null) |
|
686 | { |
|
687 | // Get ID either from posted back value, or url parameter |
|
688 | if (!$request) { |
|
689 | $this->httpError(400); |
|
690 | return null; |
|
691 | } |
|
692 | $id = $request->param('ID'); |
|
693 | if (!$id) { |
|
694 | $this->httpError(400); |
|
695 | return null; |
|
696 | } |
|
697 | return $this->getFileInsertForm($id); |
|
698 | } |
|
699 | ||
700 | /** |
|
701 | * Abstract method for generating a form for a file |