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